/* ============ LGPD / COOKIES ============ */
/* Banner não-bloqueante no rodapé + modal de preferências + utilitários */

:root {
  --lgpd-bg: var(--color-brand-night, #102a43);
  --lgpd-fg: var(--color-surface-parchment, #f5f1e8);
  --lgpd-gold: var(--color-brand-gold, #b8945a);
  --lgpd-gold-light: var(--color-brand-gold-light, #d4b87a);
  --lgpd-emerald: var(--color-brand-emerald-deep, #0d2a26);
  --lgpd-mist: var(--color-text-mist, #8a93a0);
}

/* ---------- Banner ---------- */
.lgpd-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: rgba(16, 42, 67, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(184, 148, 90, 0.32);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  padding: 20px clamp(18px, 4vw, 36px);
  transform: translateY(100%);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lgpd-banner[data-open="true"] { transform: translateY(0); }

.lgpd-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  justify-content: space-between;
}
.lgpd-banner-text {
  flex: 1 1 380px;
  font-family: 'Nunito Sans', Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(245, 241, 232, 0.85);
  margin: 0;
}
.lgpd-banner-text a {
  color: var(--lgpd-gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.lgpd-banner-text a:hover { color: #fff; }

.lgpd-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lgpd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 200ms ease;
  white-space: nowrap;
}
.lgpd-btn-primary {
  background: rgb(186, 135, 53);
  color: var(--lgpd-fg);
  border-color: rgb(186, 135, 53);
}
.lgpd-btn-primary:hover { background: rgb(204, 152, 68); border-color: rgb(204, 152, 68); }
.lgpd-btn-ghost {
  background: transparent;
  color: rgba(245, 241, 232, 0.88);
  border-color: rgba(245, 241, 232, 0.32);
}
.lgpd-btn-ghost:hover { border-color: var(--lgpd-gold-light); color: var(--lgpd-gold-light); }
.lgpd-btn-text {
  background: transparent;
  color: rgba(245, 241, 232, 0.7);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.lgpd-btn-text:hover { color: var(--lgpd-gold-light); }

/* ---------- Modal ---------- */
.lgpd-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow-y: auto;
}
.lgpd-modal[data-open="true"] { display: flex; }
.lgpd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lgpd-modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--lgpd-fg);
  border-radius: 6px;
  padding: 44px clamp(28px, 5vw, 48px) 32px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
}
.lgpd-modal-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lgpd-gold) 0%, rgb(186, 135, 53) 100%);
  border-radius: 6px 6px 0 0;
}
.lgpd-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  cursor: pointer;
  color: var(--lgpd-mist);
  font-size: 22px; line-height: 1;
  border-radius: 50%;
  transition: all 200ms ease;
}
.lgpd-modal-close:hover { background: rgba(16, 42, 67, 0.06); color: var(--lgpd-emerald); }

.lgpd-modal h2 {
  font-family: 'Nunito Sans', Georgia, serif;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--lgpd-emerald);
  letter-spacing: -0.01em;
}
.lgpd-modal h2 em { color: rgb(186, 135, 53); font-style: italic; }
.lgpd-modal-desc {
  font-family: 'Nunito Sans', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: #5a5a5a;
  margin: 0 0 28px;
}

.lgpd-categories { display: flex; flex-direction: column; gap: 0; }
.lgpd-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 20px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid rgba(13, 42, 38, 0.1);
}
.lgpd-cat:last-child { border-bottom: 1px solid rgba(13, 42, 38, 0.1); }
.lgpd-cat-title {
  font-family: 'Familjen Grotesk', 'Nunito Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--lgpd-emerald);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lgpd-cat-locked {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lgpd-mist);
  background: rgba(16, 42, 67, 0.06);
  padding: 3px 8px;
  border-radius: 3px;
}
.lgpd-cat-desc {
  font-family: 'Nunito Sans', Georgia, serif;
  font-size: 13px;
  line-height: 1.5;
  color: #6b6b6b;
  margin: 0;
}

/* Toggle switch */
.lgpd-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  margin-top: 4px;
}
.lgpd-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.lgpd-switch-slider {
  position: absolute;
  inset: 0;
  background: #c4c4c4;
  border-radius: 24px;
  cursor: pointer;
  transition: background 200ms ease;
}
.lgpd-switch-slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 200ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.lgpd-switch input:checked + .lgpd-switch-slider { background: rgb(186, 135, 53); }
.lgpd-switch input:checked + .lgpd-switch-slider::before { transform: translateX(18px); }
.lgpd-switch input:disabled + .lgpd-switch-slider {
  background: var(--lgpd-emerald);
  cursor: not-allowed;
  opacity: 0.85;
}
.lgpd-switch input:disabled + .lgpd-switch-slider::before { background: var(--lgpd-gold-light); }

.lgpd-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 28px;
}
.lgpd-modal-actions .lgpd-btn { padding: 12px 20px; }
.lgpd-modal-actions .lgpd-btn-ghost {
  color: var(--lgpd-emerald);
  border-color: rgba(13, 42, 38, 0.28);
}
.lgpd-modal-actions .lgpd-btn-ghost:hover {
  border-color: var(--lgpd-emerald);
  background: var(--lgpd-emerald);
  color: var(--lgpd-gold-light);
}
.lgpd-modal-actions .lgpd-btn-primary {
  background: var(--lgpd-emerald);
  border-color: var(--lgpd-emerald);
  color: var(--lgpd-gold-light);
}
.lgpd-modal-actions .lgpd-btn-primary:hover {
  background: rgb(186, 135, 53);
  border-color: rgb(186, 135, 53);
  color: #fff;
}

@media (max-width: 600px) {
  .lgpd-modal { padding: 24px 14px; }
  .lgpd-modal-panel { padding: 36px 22px 26px; }
  .lgpd-banner { padding: 18px 16px; }
  .lgpd-banner-text { font-size: 13px; flex-basis: 100%; }
}

body.lgpd-modal-open { overflow: hidden; }

/* ---------- Footer legal links ---------- */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid rgba(184, 148, 90, 0.14);
}
.footer-legal a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.65);
  text-decoration: none;
  transition: color 200ms ease;
}
.footer-legal a:hover { color: var(--lgpd-gold-light); }
.footer-legal .sep { color: rgba(245, 241, 232, 0.25); font-size: 11px; }

/* ---------- Checkbox de consentimento em formulários ---------- */
.lgpd-consent-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 14px;
  padding: 14px 16px;
  background: rgba(13, 42, 38, 0.04);
  border-left: 2px solid var(--lgpd-gold);
  border-radius: 3px;
}
.lgpd-consent-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: rgb(186, 135, 53);
  cursor: pointer;
}
.lgpd-consent-field label {
  font-family: 'Nunito Sans', Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--lgpd-emerald);
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}
.lgpd-consent-field label a {
  color: rgb(186, 135, 53);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lgpd-consent-field label a:hover { color: var(--lgpd-emerald); }
button[disabled].submit, .submit:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  transform: none !important;
}
.lgpd-consent-receipt {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--lgpd-mist);
  margin: 14px auto 0;
  max-width: 38ch;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
}
.lgpd-consent-receipt strong {
  color: var(--lgpd-emerald);
  font-weight: 600;
}
