/* ==========================================================================
   JUNTOS — Privacidade, Cookies e Central de Preferências (LGPD)
   Identidade visual: Off-white (#faf7f0 / #f6f2e9), Verde-oliva (#474b3c),
   Areia (#d8c9b4), Terracota (#9e5b43), Nunito Editorial + Montserrat.
   Sem bloqueio da navegação e com destaque equivalente entre aceitar e recusar.
   ========================================================================== */

.footer-manage-cookies-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(185, 119, 93, .6);
  cursor: pointer;
}

.privacy-banner {
  position: fixed;
  left: clamp(16px, 2.4vw, 28px);
  bottom: clamp(16px, 2.4svh, 28px);
  z-index: 85;
  width: min(calc(100vw - 32px), 448px);
  padding: 20px 22px 20px;
  border-radius: 18px;
  background: #faf7f0;
  border: 1px solid #d8c9b4d9;
  box-shadow:
    0 24px 52px -18px rgba(34, 38, 28, .32),
    0 6px 16px -8px rgba(34, 38, 28, .16);
  color: var(--ink, #5f6251);
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  pointer-events: none;
  transition:
    opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-banner.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.privacy-banner[hidden] {
  display: none;
}

.privacy-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.privacy-bird-mark {
  width: 24px;
  height: 24px;
  flex: none;
  color: #8b503e;
}

.privacy-bird-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-banner-title {
  margin: 0;
  font-family: 'Nunito Editorial', Montserrat, sans-serif;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink, #5f6251);
}

.privacy-banner-text {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.56;
  color: #5f6251eb;
}

.privacy-banner-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/* Botões de aceitação e rejeição com peso visual equivalente (zero dark patterns) */
.privacy-btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--ink, #5f6251);
  background: #faf7f0;
  color: var(--ink, #5f6251);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition:
    background-color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.privacy-btn--equal {
  background: var(--ink, #5f6251);
  border-color: var(--ink, #5f6251);
  color: var(--paper, #f6f2e9);
}

.privacy-btn--equal:hover {
  background: #9e5b43;
  border-color: #9e5b43;
}

.privacy-btn--outline {
  background: transparent;
  border-color: #5f625166;
  color: var(--ink, #5f6251);
}

.privacy-btn--outline:hover {
  background: #efe9dc;
  border-color: var(--ink, #5f6251);
}

.privacy-btn--prefs {
  grid-column: 1 / -1;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b503e;
  font-size: 12.8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-btn--prefs:hover {
  background: rgba(185, 119, 93, .08);
}

.privacy-btn:focus-visible {
  outline: 2px solid #383c2f;
  outline-offset: 3px;
}

/* ==========================================================================
   CENTRAL DE PREFERÊNCIAS DE PRIVACIDADE (MODAL ACESSÍVEL)
   ========================================================================== */

.privacy-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 98;
  padding: 20px;
  background: rgba(34, 38, 28, .72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 220ms;
}

.privacy-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.privacy-modal-dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88svh, 700px);
  overflow-y: auto;
  border-radius: 20px;
  background: #faf7f0;
  border: 1px solid #d8c9b4;
  box-shadow: 0 32px 72px -24px rgba(18, 20, 14, .58);
  color: #383c2f;
  padding: 26px 26px 24px;
  transform: translate3d(0, 14px, 0) scale(.98);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-modal-backdrop.is-open .privacy-modal-dialog {
  transform: translate3d(0, 0, 0) scale(1);
}

.privacy-modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.privacy-modal-title {
  margin: 0;
  font-family: 'Nunito Editorial', Montserrat, sans-serif;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.022em;
  color: #383c2f;
}

.privacy-modal-close {
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d8c9b4;
  background: transparent;
  color: #383c2f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms ease, color 160ms ease;
}

.privacy-modal-close:hover {
  background: #474b3c;
  border-color: #474b3c;
  color: #f6f2e9;
}

.privacy-modal-close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.privacy-modal-intro {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.58;
  color: #5f6251eb;
}

.privacy-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.privacy-cat {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d8c9b499;
  background: #f6f2e9;
}

.privacy-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.privacy-cat-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: #383c2f;
}

.privacy-cat-status {
  font-size: 12px;
  color: #5f6251c4;
  white-space: nowrap;
}

.privacy-cat-desc {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.52;
  color: #5f6251de;
}

/* Interruptor acessível para categorias opcionais */
.privacy-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex: none;
}

.privacy-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.privacy-switch-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d8c9b4;
  position: relative;
  transition: background-color 180ms ease;
}

.privacy-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #faf7f0;
  box-shadow: 0 1px 3px rgba(34, 38, 28, .25);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.privacy-switch input:checked + .privacy-switch-track {
  background: #9e5b43;
}

.privacy-switch input:checked + .privacy-switch-track::after {
  transform: translateX(20px);
}

.privacy-switch input:focus-visible + .privacy-switch-track {
  outline: 2px solid #383c2f;
  outline-offset: 3px;
}

.privacy-audit-note {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(95, 98, 81, .08);
  font-size: 12.5px;
  line-height: 1.5;
  color: #474b3c;
}

.privacy-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.privacy-modal-actions .privacy-btn--save {
  grid-column: 1 / -1;
  background: #9e5b43;
  border-color: #9e5b43;
  color: #f6f2e9;
}

.privacy-modal-actions .privacy-btn--save:hover {
  background: #8b503e;
  border-color: #8b503e;
}

.privacy-modal-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d8c9b478;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12.5px;
  color: #5f6251cc;
}

.privacy-modal-footer a {
  color: #8b503e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Estado de bloqueio elegante para mídia externa no modal de Reels sem consentimento */
.reel-consent-gate {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reel-consent-btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(233, 190, 167, .55);
  background: #9e5b43;
  color: #f6f2e9;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  transition: background-color 160ms ease;
}

.reel-consent-btn:hover {
  background: #ad664d;
}

@media (max-width: 600px) {
  .privacy-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 16px 16px 14px;
  }

  .privacy-modal-dialog {
    padding: 20px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-banner,
  .privacy-modal-backdrop,
  .privacy-modal-dialog,
  .privacy-switch-track,
  .privacy-switch-track::after {
    transition: none !important;
  }
}
