.meinlem-consent-banner,
.meinlem-consent-panel,
.meinlem-consent-manage {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.meinlem-consent-banner[hidden],
.meinlem-consent-overlay[hidden] {
  display: none !important;
}

.meinlem-consent-banner {
  position: fixed;
  z-index: 2147483000;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  max-width: 1120px;
  margin-inline: auto;
  padding: 1.15rem;
  border: 1px solid rgba(223, 172, 87, 0.55);
  border-radius: 18px;
  color: #edf2f8;
  background: rgba(7, 11, 25, 0.98);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.72), 0 0 30px rgba(223, 172, 87, 0.12);
  backdrop-filter: blur(18px);
}

.meinlem-consent-copy strong { color: #f5d89e; font-size: 1rem; }
.meinlem-consent-copy p { margin: 0.35rem 0; color: #b7c2d1; font-size: 0.78rem; line-height: 1.55; }
.meinlem-consent-copy a { color: #e8c477; font-size: 0.72rem; }
.meinlem-consent-actions, .meinlem-consent-panel-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.meinlem-consent-actions { justify-content: flex-end; }

.meinlem-consent-actions button,
.meinlem-consent-panel-actions button {
  min-height: 42px;
  padding: 0.68rem 0.9rem;
  border: 1px solid rgba(223, 172, 87, 0.5);
  border-radius: 999px;
  color: #f3dfb7;
  background: rgba(223, 172, 87, 0.08);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.meinlem-consent-actions button:hover,
.meinlem-consent-actions button:focus-visible,
.meinlem-consent-panel-actions button:hover,
.meinlem-consent-panel-actions button:focus-visible {
  outline: 3px solid rgba(255, 241, 211, 0.86);
  outline-offset: 2px;
  background: rgba(223, 172, 87, 0.18);
}

.meinlem-consent-overlay {
  position: fixed;
  z-index: 2147483100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(1, 3, 10, 0.84);
  backdrop-filter: blur(14px);
}

.meinlem-consent-open { overflow: hidden; }

.meinlem-consent-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100dvh - 1.5rem);
  overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 2.4rem);
  border: 1px solid rgba(223, 172, 87, 0.48);
  border-radius: 22px;
  color: #e7edf5;
  background: linear-gradient(145deg, #10162a, #060a16);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.8);
}

.meinlem-consent-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.meinlem-consent-kicker { color: #dcb466; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.12em; }
.meinlem-consent-panel h2 { max-width: 560px; margin: 0.55rem 3rem 0.8rem 0; color: #f6e4c0; font-size: clamp(1.55rem, 5vw, 2.5rem); line-height: 1.08; }
.meinlem-consent-panel > p { color: #aeb9c9; font-size: 0.8rem; line-height: 1.6; }

.meinlem-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.meinlem-consent-category strong, .meinlem-consent-category small { display: block; }
.meinlem-consent-category strong { color: #f0dfbd; font-size: 0.86rem; }
.meinlem-consent-category small { margin-top: 0.25rem; color: #8f9db1; font-size: 0.68rem; line-height: 1.48; }
.meinlem-consent-always { color: #a9e5b1; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.06em; }
.meinlem-consent-toggle { cursor: pointer; }
.meinlem-consent-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.meinlem-consent-toggle > span { position: relative; width: 48px; height: 28px; border: 1px solid #68758a; border-radius: 999px; background: #222b3b; }
.meinlem-consent-toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #d5dce6; transition: transform 180ms ease; }
.meinlem-consent-toggle input:checked + span { border-color: #dcb466; background: rgba(220, 180, 102, 0.3); }
.meinlem-consent-toggle input:checked + span::after { transform: translateX(20px); background: #ffe6af; }
.meinlem-consent-toggle input:focus-visible + span { outline: 3px solid #fff1d3; outline-offset: 3px; }
.meinlem-consent-note { margin: 1rem 0; }
.meinlem-consent-panel-actions { justify-content: flex-end; }

.meinlem-consent-manage {
  position: fixed;
  z-index: 2147482000;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  min-height: 34px;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(223, 172, 87, 0.38);
  border-radius: 999px;
  color: #d9bd85;
  background: rgba(7, 11, 25, 0.92);
  font-size: 0.56rem;
  font-weight: 800;
  cursor: pointer;
}

.meinlem-consent-banner:not([hidden]) ~ .meinlem-consent-manage { display: none; }

/* O leitor é uma experiência temporária em tela cheia. O consentimento volta ao
   mesmo estado assim que o leitor é fechado, sem habilitar qualquer categoria. */
html.sample-reader-open .meinlem-consent-banner,
html.sample-reader-open .meinlem-consent-overlay,
html.sample-reader-open .meinlem-consent-manage {
  display: none !important;
}

@media (max-width: 760px) {
  .meinlem-consent-banner { grid-template-columns: 1fr; max-height: calc(100dvh - 2rem); overflow-y: auto; }
  .meinlem-consent-actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .meinlem-consent-actions button:last-child { grid-column: 1 / -1; }
  .meinlem-consent-actions button { width: 100%; }
  .meinlem-consent-panel-actions { display: grid; grid-template-columns: 1fr; }
  .meinlem-consent-panel-actions button { width: 100%; }
  .meinlem-consent-category { gap: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .meinlem-consent-toggle > span::after { transition: none; }
}
