/* ==============================================================
   site-consent.css - consent banner + preferences panel (IA 3.0)
   Markup generated by site-consent.js - class names are fixed.
   ============================================================== */

.site-consent-root {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

.site-consent-banner,
.site-consent-panel {
  width: min(640px, calc(100vw - 2rem));
  pointer-events: auto;
  border: 1px solid var(--border, rgba(44, 224, 199, 0.14));
  border-radius: 16px;
  background: var(--panel, rgba(13, 20, 35, 0.94));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 16px 40px rgba(0, 0, 0, 0.35);
  color: var(--text, #C6D2E2);
}

.site-consent-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1.15rem 1.25rem;
}

.site-consent-copy {
  min-width: 0;
}

.site-consent-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2, #FFA05C);
}

.site-consent-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text, #C6D2E2);
  max-width: 100%;
}

.site-consent-text a,
.site-consent-panel a {
  color: var(--accent, #2CE0C7);
  text-decoration: none;
}

.site-consent-text a:hover,
.site-consent-panel a:hover {
  text-decoration: underline;
}

.site-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-start;
}

.site-consent-btn {
  border: 1px solid var(--border, rgba(44, 224, 199, 0.16));
  border-radius: 12px;
  background: transparent;
  color: var(--text, #C6D2E2);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.site-consent-btn:hover {
  border-color: rgba(44, 224, 199, 0.36);
  color: var(--accent, #2CE0C7);
  transform: translateY(-1px);
}

.site-consent-btn:focus-visible {
  outline: 2px solid var(--accent, #2CE0C7);
  outline-offset: 2px;
}

.site-consent-btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2CE0C7, #1FB9A6);
  color: var(--on-accent, #05221E);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 22px rgba(44, 224, 199, 0.18);
}

.site-consent-btn--primary:hover {
  color: var(--on-accent, #05221E);
  border-color: transparent;
  filter: brightness(1.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 12px 28px rgba(44, 224, 199, 0.24);
}

:root[data-theme="light"] .site-consent-btn--primary {
  background: linear-gradient(135deg, #0E7A6E, #0A6459);
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(14, 122, 110, 0.2);
}

:root[data-theme="light"] .site-consent-btn--primary:hover {
  color: #FFFFFF;
}

.site-consent-btn--danger {
  border-color: var(--border, rgba(44, 224, 199, 0.16));
  color: var(--text, #C6D2E2);
  background: transparent;
}

.site-consent-panel {
  display: none;
  padding: 1.2rem 1.25rem 1.25rem;
}

.site-consent-panel.is-open {
  display: block;
}

.site-consent-panel__title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text-strong, #F4F8FF);
  margin-bottom: 0.8rem;
}

.site-consent-panel__body {
  display: grid;
  gap: 0.8rem;
}

.site-consent-option {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.site-consent-option__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-consent-option__label {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-strong, #F4F8FF);
}

.site-consent-option__desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-dim, #93A1B5);
}

.site-consent-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(44, 224, 199, 0.16));
  background: rgba(255, 255, 255, 0.05);
  appearance: none;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.site-consent-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(198, 210, 226, 0.78);
  transition: transform 180ms ease, background 180ms ease;
}

.site-consent-toggle:checked {
  background: rgba(44, 224, 199, 0.16);
  border-color: rgba(44, 224, 199, 0.4);
}

.site-consent-toggle:checked::after {
  transform: translateX(20px);
  background: var(--accent, #2CE0C7);
}

.site-consent-toggle:focus-visible {
  outline: 2px solid var(--accent, #2CE0C7);
  outline-offset: 2px;
}

.site-consent-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.site-consent-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

@media (max-width: 760px) {
  .site-consent-root {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .site-consent-banner,
  .site-consent-panel {
    width: 100%;
  }

  .site-consent-actions,
  .site-consent-panel__actions {
    justify-content: stretch;
  }

  .site-consent-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .site-consent-root {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }

  .site-consent-banner {
    padding: 1rem;
    gap: 0.75rem;
  }

  .site-consent-panel {
    padding: 1rem;
  }

  .site-consent-text,
  .site-consent-option__desc {
    font-size: 0.78rem;
    line-height: 1.6;
  }
}
