.privacy-ui { position: relative; z-index: 1000; }
.cookie-banner,
.cookie-modal {
  box-sizing: border-box;
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: var(--ink, #f5f4f8);
}

.cookie-banner {
  position: fixed;
  z-index: 1000;
  right: auto;
  bottom: 24px;
  left: 50%;
  width: min(1180px, calc(100% - 48px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: none;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--line, rgba(255, 255, 255, .14));
  border-radius: 14px;
  background: var(--paper, #15151b);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .34);
  line-height: 1.55;
  transform: translateX(-50%);
}
.cookie-banner[hidden],
.cookie-modal[hidden] { display: none; }
.cookie-banner__copy { max-width: 680px; }
.cookie-banner__copy strong { display: block; margin-bottom: 5px; font-size: 16px; line-height: 1.2; }
.cookie-banner__copy p { margin: 0 0 6px; color: var(--muted, #b9b7c1); font-size: 13px; line-height: 1.55; }
.cookie-banner__copy a { color: var(--accent, #817aff); font-size: 12px; font-weight: 700; }
.cookie-banner__actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }

.cookie-btn,
.cookie-modal__close {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.cookie-btn {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn--primary { color: #fff; background: var(--accent-strong, #635bff); border-color: var(--accent-strong, #635bff); }
.cookie-btn--primary:hover { background: #5149dd; border-color: #5149dd; }
.cookie-btn--outline { color: #1b1a1f; background: #fff; border-color: #c9c6d1; }
.cookie-btn--outline:hover { border-color: #817c8a; }
.cookie-btn--ghost { color: #1b1a1f; background: #efedf3; border-color: #efedf3; }
.cookie-btn--ghost:hover { background: #dfdce5; border-color: #dfdce5; }
.cookie-btn:focus-visible,
.cookie-modal__close:focus-visible,
.cookie-option input:focus-visible { outline: 3px solid #9e99ff; outline-offset: 2px; }

.cookie-modal {
  position: fixed;
  z-index: 1001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}
.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 13, .74);
  backdrop-filter: blur(3px);
}
.cookie-modal__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid var(--line, rgba(255, 255, 255, .14));
  border-radius: 14px;
  background: var(--paper, #15151b);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
  outline: none;
}
.cookie-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .12));
}
.cookie-modal__header h2 { margin: 5px 0 0; font-size: 27px; line-height: 1.1; letter-spacing: -.025em; }
.cookie-modal__eyebrow {
  color: var(--accent, #817aff);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}
.cookie-modal__close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #1b1a1f;
  background: #efedf3;
  font-size: 24px;
  line-height: 1;
}
.cookie-modal__intro { margin: 18px 0; color: var(--muted, #b9b7c1); font-size: 13px; line-height: 1.55; }
.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .12));
}
.cookie-option:first-of-type { border-top: 0; }
.cookie-option strong { display: block; margin-bottom: 4px; font-size: 14px; }
.cookie-option p { margin: 0; color: var(--muted, #b9b7c1); font-size: 12px; line-height: 1.5; }
.cookie-option input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--accent-strong, #635bff); cursor: pointer; }
.cookie-always { color: var(--green, #67d6a5); font-size: 11px; font-weight: 700; white-space: nowrap; }
.cookie-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .12));
}
.cookie-modal-open { overflow: hidden; }

/* A home reserva --paper/--ink para o comprovante claro. O consentimento usa
   seus próprios tons para não herdar esse papel e mudar de aparência entre
   a página principal e as páginas de aquisição. */
:root:not([data-theme="light"]) .cookie-banner,
:root:not([data-theme="light"]) .cookie-modal { color: #f6f5f8; }
:root:not([data-theme="light"]) .cookie-banner,
:root:not([data-theme="light"]) .cookie-modal__panel {
  background: #15151b;
  border-color: rgba(255, 255, 255, .12);
}
:root:not([data-theme="light"]) .cookie-banner__copy p,
:root:not([data-theme="light"]) .cookie-modal__intro,
:root:not([data-theme="light"]) .cookie-option p { color: #b9b7c1; }

:root[data-theme="light"] .cookie-banner,
:root[data-theme="light"] .cookie-modal { color: #1b1a1f; }
:root[data-theme="light"] .cookie-banner,
:root[data-theme="light"] .cookie-modal__panel { background: #fff; border-color: rgba(25, 24, 29, .13); }
:root[data-theme="light"] .cookie-banner__copy p,
:root[data-theme="light"] .cookie-modal__intro,
:root[data-theme="light"] .cookie-option p { color: #625f68; }
:root[data-theme="light"] .cookie-modal__header,
:root[data-theme="light"] .cookie-option,
:root[data-theme="light"] .cookie-modal__actions { border-color: rgba(25, 24, 29, .11); }

/* As páginas clássicas ampliam o body em monitores largos. A interface de
   privacidade permanece no tamanho real, igual às páginas de aquisição. */
@media (min-width: 1440px) and (max-width: 1749px) {
  body.marketing-scaled .privacy-ui { zoom: .8695652174; }
}
@media (min-width: 1750px) {
  body.marketing-scaled .privacy-ui { zoom: .7692307692; }
}

@media (max-width: 760px) {
  .cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    transform: none;
  }
  .cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-banner__actions .cookie-btn--primary { grid-column: 1 / -1; grid-row: 1; }
  .cookie-btn { width: 100%; }
  .cookie-modal { padding: 10px; }
  .cookie-modal__panel { max-height: calc(100vh - 20px); padding: 22px 18px; }
  .cookie-modal__header h2 { font-size: 23px; }
  .cookie-option { gap: 16px; }
  .cookie-modal__actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-btn { transition: none; }
  .cookie-btn:hover { transform: none; }
  .cookie-banner, .cookie-modal { scroll-behavior: auto; }
}
