/* Cookie consent banner + preferences modal. Shared across every page.
   Relies on CSS custom properties defined in each page's theme block
   (--accent, --card-bg, --card-border, --radius, --muted, --ink). */

.cookie-banner {
  position: fixed;
  inset: auto 16px 16px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: 22px;
  background: rgba(5, 18, 26, .95);
  border: 1px solid rgba(255, 255, 255, .1);
  z-index: 100;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  max-width: 520px;
}
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.cookie-actions { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; flex-shrink: 0; }

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 12, 18, .85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 101;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal-overlay.visible { display: flex; }
.cookie-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .45);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}
.cookie-modal h2 { margin: 0 0 .5rem; font-size: 1.4rem; }

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: .75rem;
}
.cookie-option:last-of-type { margin-bottom: 1.5rem; }
.cookie-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  margin-top: .15rem;
  flex-shrink: 0;
}
.cookie-option label { cursor: pointer; }
.cookie-option strong { display: block; margin-bottom: .25rem; }
.cookie-option span { font-size: .85rem; color: var(--muted); }
.cookie-option.disabled { opacity: .7; }
.cookie-option.disabled input { pointer-events: none; }

.cookie-modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn-small {
  border-radius: 999px;
  padding: .5rem 1rem;
  border: 1px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.btn-small.primary {
  background: linear-gradient(120deg, var(--accent), #9cd5ff);
  color: #031015;
  border-color: transparent;
}
