/* ============================================
   4Strategies - Cookie Consent Banner (LGPD)
   ============================================ */

/* Overlay */
.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.cookie-consent {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  max-width: 520px;
  width: 90%;
  padding: 32px;
  position: relative;
  font-family: var(--font-primary);
}

/* Close button */
.cookie-consent__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #333;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.cookie-consent__close:hover {
  background: #f0f0f0;
}

/* Title */
.cookie-consent__title {
  font-size: 20px;
  font-weight: var(--fw-semibold);
  color: #333;
  text-align: center;
  margin-bottom: 16px;
}

/* Description */
.cookie-consent__text {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  text-align: justify;
  margin-bottom: 24px;
}

/* Buttons */
.cookie-consent__buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.cookie-consent__btn {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.cookie-consent__btn--accept {
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}

.cookie-consent__btn--accept:hover {
  background: #003d66;
  border-color: #003d66;
}

.cookie-consent__btn--deny {
  background: #fff;
  color: #333;
  border: 2px solid #ccc;
}

.cookie-consent__btn--deny:hover {
  background: #f5f5f5;
  border-color: #999;
}

.cookie-consent__btn--preferences {
  background: #fff;
  color: #333;
  border: 2px solid #ccc;
}

.cookie-consent__btn--preferences:hover {
  background: #f5f5f5;
  border-color: #999;
}

/* Links */
.cookie-consent__links {
  display: flex;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.cookie-consent__links a {
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: underline;
}

.cookie-consent__links a:hover {
  color: var(--color-secondary);
}

/* Preferences Panel */
.cookie-preferences {
  display: none;
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.cookie-preferences.active {
  display: block;
}

.cookie-preferences__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cookie-preferences__item:last-child {
  border-bottom: none;
}

.cookie-preferences__label {
  font-size: 14px;
  color: #333;
  font-weight: var(--fw-medium);
}

.cookie-preferences__desc {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--color-accent);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-preferences__save {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-preferences__save:hover {
  background: #003d66;
}

/* Responsive */
@media (max-width: 480px) {
  .cookie-consent {
    padding: 24px 20px;
    width: 95%;
  }

  .cookie-consent__buttons {
    flex-direction: column;
  }

  .cookie-consent__btn {
    width: 100%;
  }
}
