/* ==============================================================================
   7SD - Faixa de Proteção & Consentimento LGPD (Lei Geral de Proteção de Dados)
   ============================================================================== */

:root {
  --lgpd-bg: rgba(13, 8, 24, 0.94);
  --lgpd-surface: rgba(26, 17, 46, 0.85);
  --lgpd-border: rgba(184, 107, 255, 0.3);
  --lgpd-accent: #7b2eff;
  --lgpd-accent-glow: #b86bff;
  --lgpd-text: #ffffff;
  --lgpd-muted: #b8b3cb;
  --lgpd-radius: 18px;
}

/* Container Flutuante da Faixa LGPD */
.lgpd-banner-wrapper {
  position: fixed;
  bottom: 24px;
  left: 20px;
  right: 20px;
  max-width: 980px;
  margin: 0 auto;
  z-index: 99998;
  display: none;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.lgpd-banner-wrapper.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.lgpd-banner-wrapper.is-hiding {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
}

/* Card Principal */
.lgpd-card {
  background: var(--lgpd-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--lgpd-border);
  border-radius: var(--lgpd-radius);
  padding: 1.35rem 1.6rem;
  box-shadow: 
    0 24px 50px rgba(0, 0, 0, 0.75),
    0 0 32px rgba(123, 46, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Brilho Superior Sutil */
.lgpd-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 107, 255, 0.6), transparent);
}

/* Bloco Esquerdo (Ícone + Texto) */
.lgpd-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1 1 560px;
  min-width: 0;
}

.lgpd-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(123, 46, 255, 0.25), rgba(184, 107, 255, 0.12));
  border: 1px solid rgba(184, 107, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  box-shadow: 0 4px 14px rgba(123, 46, 255, 0.25);
  margin-top: 2px;
}

.lgpd-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lgpd-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.lgpd-badge-law {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  background: rgba(123, 46, 255, 0.25);
  border: 1px solid rgba(184, 107, 255, 0.4);
  border-radius: 999px;
  color: #e9d5ff;
}

.lgpd-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--lgpd-muted);
  margin: 0;
}

.lgpd-link {
  color: #c084fc;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.lgpd-link:hover {
  color: #ffffff;
}

/* Bloco Direito (Botões de Ação) */
.lgpd-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.lgpd-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

/* Botão Primário: Aceitar Todos */
.lgpd-btn-accept {
  background: linear-gradient(135deg, #7b2eff, #9a4dff);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(123, 46, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lgpd-btn-accept:hover {
  background: linear-gradient(135deg, #8a42ff, #aa63ff);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(123, 46, 255, 0.55);
}

/* Botão Secundário: Apenas Essenciais */
.lgpd-btn-essential {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e0ed;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lgpd-btn-essential:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Botão Terciário: Personalizar */
.lgpd-btn-custom {
  background: transparent;
  color: #c9c6d8;
  border: 1px solid transparent;
  padding: 0.65rem 0.85rem;
}

.lgpd-btn-custom:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Gatilho no Rodapé (identidade 100% idêntica aos links legais vizinhos) */
.footer-cookie-trigger {
  cursor: pointer;
}

/* ==============================================================================
   MODAL DE PREFERÊNCIAS PERSONALIZADAS LGPD
   ============================================================================== */
.lgpd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lgpd-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.lgpd-modal-card {
  background: #0f0a1c;
  border: 1px solid rgba(184, 107, 255, 0.35);
  border-radius: 20px;
  max-width: 580px;
  width: 100%;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(123, 46, 255, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lgpd-modal-overlay.is-active .lgpd-modal-card {
  transform: scale(1);
}

.lgpd-modal-header {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lgpd-modal-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lgpd-modal-close {
  background: transparent;
  border: none;
  color: #9d98b3;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lgpd-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.lgpd-modal-body {
  padding: 1.4rem 1.6rem;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.lgpd-category-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.lgpd-category-info h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lgpd-category-info p {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--lgpd-muted);
  margin: 0;
}

.lgpd-badge-required {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 999px;
  color: #6ee7b7;
}

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

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

.lgpd-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.lgpd-switch input:checked + .lgpd-slider {
  background-color: var(--lgpd-accent);
  border-color: var(--lgpd-accent-glow);
}

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

.lgpd-switch input:disabled + .lgpd-slider {
  cursor: not-allowed;
  opacity: 0.6;
}

.lgpd-modal-footer {
  padding: 1.15rem 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
}

/* ==============================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ============================================================================== */
@media (max-width: 820px) {
  .lgpd-banner-wrapper {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  .lgpd-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.15rem 1.25rem;
    gap: 1.15rem;
  }

  .lgpd-content {
    flex: none;
    gap: 0.85rem;
  }

  .lgpd-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .lgpd-title {
    font-size: 0.9rem;
    flex-wrap: wrap;
  }

  .lgpd-desc {
    font-size: 0.8rem;
  }

  .lgpd-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .lgpd-btn {
    width: 100%;
    padding: 0.7rem 0.5rem;
    font-size: 0.82rem;
  }

  .lgpd-btn-accept {
    grid-column: span 2;
  }

  /* Ajuste no botão flutuante de WhatsApp quando o banner estiver aberto */
  body.has-lgpd-banner .floating-whatsapp {
    bottom: 190px;
    transition: bottom 0.3s ease;
  }
}

