/* ══════════════════════════════════════════════════════════════
   cookie-banner.css — Banner e Modal de Consentimento (LGPD)
   Design Dark Luxury refinado com suporte a Mobile e Animações
   ══════════════════════════════════════════════════════════════ */

/* ─── Banner Flutuante Inferior ─── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 1100px;
  margin: 0 auto;
  z-index: 99999;
  background: rgba(18, 18, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 24px 64px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cookie-banner__content {
  flex: 1;
  min-width: 0;
}

.cookie-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  margin-bottom: 8px;
}

.cookie-banner__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
}

.cookie-banner__title {
  font-size: 16px;
  font-weight: 750;
  color: #fff;
  letter-spacing: -0.01em;
}

.cookie-banner__text {
  font-size: 13.5px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-top: 6px;
}

.cookie-banner__link {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__link:hover {
  color: #93c5fd;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 10px;
  white-space: nowrap;
}

/* ─── Modal de Personalização ─── */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cookie-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #141419;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 32px 80px -15px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 720px);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cookie-modal__header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-modal__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fff;
}

.cookie-modal__subtitle {
  font-size: 13.5px;
  color: #a1a1aa;
  margin-top: 4px;
  line-height: 1.45;
}

.cookie-modal__close {
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}

.cookie-modal__close:hover {
  color: #fff;
}

.cookie-modal__body {
  padding: 20px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color 0.2s;
}

.cookie-category:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.cookie-category__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-category__name {
  font-size: 15px;
  font-weight: 700;
  color: #f4f4f5;
  cursor: pointer;
}

.cookie-category__status--locked {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cookie-category__desc {
  font-size: 13px;
  color: #94949e;
  line-height: 1.5;
  margin-top: 6px;
}

/* ─── Toggle Switch Customizado ─── */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cookie-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #272730;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-switch__slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cookie-switch input:checked + .cookie-switch__slider {
  background: #2563eb;
  border-color: #3b82f6;
}

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

.cookie-modal__footer {
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.cookie-modal__btn {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 10px;
}

/* ─── Botão de Reabertura no Footer ─── */
.footer__cookie-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.footer__cookie-btn:hover {
  color: #fff;
}

/* ─── Responsividade ─── */
@media (max-width: 880px) {
  .cookie-banner {
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 20px;
  }

  .cookie-banner__container {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

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

  .cookie-banner__actions .cookie-banner__btn {
    width: 100%;
    justify-content: center;
  }

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

  .cookie-modal__footer .cookie-modal__btn {
    width: 100%;
    justify-content: center;
  }
}

