/* =========================================================
   THE NULL / IN-2 SPACE - COOKIE CONSENT MODULE
   Standalone CSS. Does not use .modal or .btn to avoid clashes.
   ========================================================= */

:root {
  --cookie-gold: var(--gold, #c99445);
  --cookie-gold-bright: var(--line-bright, rgba(245, 192, 90, 0.85));
  --cookie-text: var(--text, #f2eadb);
  --cookie-muted: var(--muted, #a89d89);
  --cookie-bg: rgba(6, 7, 8, 0.88);
  --cookie-bg-strong: rgba(8, 9, 10, 0.96);
  --cookie-border: rgba(245, 192, 90, 0.34);
}

.cookie-banner {
  position: fixed;
  left: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 24px);
  z-index: var(--z-cookie-banner, 11000);

  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;

  border: 1px solid var(--cookie-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(245, 192, 90, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(8, 10, 12, 0.94), rgba(5, 5, 6, 0.82));
  color: var(--cookie-text);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.62),
    0 0 28px rgba(201, 148, 69, 0.12);
  backdrop-filter: blur(14px);

  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner.hidden,
.cookie-modalcookie.hidden {
  display: none !important;
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.cookie-text {
  flex: 1 1 340px;
  min-width: 0;
}

.cookie-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--cookie-gold);
  font-family: var(--font-title, Georgia, serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cookie-text h4 {
  margin: 0 0 5px;
  color: var(--cookie-text);
  font-family: var(--font-title, Georgia, serif);
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.cookie-text p {
  margin: 0;
  max-width: 760px;
  color: var(--cookie-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.cookie-actions,
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 192, 90, 0.36);
  background: rgba(0, 0, 0, 0.38);
  color: var(--cookie-text);
  cursor: pointer;

  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;

  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(201, 148, 69, 0.07);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.cookie-btn:hover {
  transform: translateY(-1px);
  border-color: var(--cookie-gold-bright);
  color: #fff4c5;
  box-shadow:
    0 0 16px rgba(201, 148, 69, 0.24),
    inset 0 0 22px rgba(201, 148, 69, 0.08);
}

.cookie-btn:active {
  transform: translateY(0) scale(0.98);
}

.cookie-btn-primary {
  background:
    linear-gradient(180deg, rgba(245, 192, 90, 0.82), rgba(132, 82, 22, 0.86));
  color: #161008;
  border-color: rgba(255, 224, 154, 0.92);
  text-shadow: none;
}

.cookie-btn-primary:hover {
  color: #050403;
  box-shadow:
    0 0 18px rgba(245, 192, 90, 0.4),
    inset 0 0 18px rgba(255, 255, 255, 0.12);
}

.cookie-btn-ghost {
  background: transparent;
}

.cookie-btn-soft {
  background: rgba(255, 255, 255, 0.045);
}

/* Overlay/modal uses its own name to avoid collisions with your existing modal system. */
.cookie-modalcookie {
  position: fixed;
  inset: 0;
  z-index: var(--z-cookie-modal, 11100);
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 35%, rgba(201, 148, 69, 0.12), transparent 38%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.cookie-card {
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow: auto;
  position: relative;
  border: 1px solid var(--cookie-gold-bright);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(8, 10, 12, 0.98), rgba(16, 13, 8, 0.96));
  color: var(--cookie-text);
  padding: clamp(20px, 4vw, 32px);
  box-shadow:
    0 0 80px rgba(0, 0, 0, 0.82),
    0 0 38px rgba(201, 148, 69, 0.18);
}

.cookie-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(245, 192, 90, 0.08), transparent 56% 100%);
}

.cookie-card > * {
  position: relative;
  z-index: 1;
}

.cookie-card h2 {
  margin: 0 0 10px;
  color: var(--cookie-text);
  font-family: var(--font-title, Georgia, serif);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.cookie-subtext {
  margin: 0 0 18px;
  color: var(--cookie-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.cookie-option {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid rgba(245, 192, 90, 0.16);
}

.cookie-option h3 {
  margin: 0 0 4px;
  color: var(--cookie-text);
  font-family: var(--font-title, Georgia, serif);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-option p {
  margin: 0;
  color: var(--cookie-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.cookie-switch {
  position: relative;
  width: 50px;
  height: 26px;
  flex: 0 0 auto;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(245, 192, 90, 0.28);
  background: rgba(0, 0, 0, 0.56);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: 200ms ease;
}

.cookie-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #73501f, #20150a);
  border: 1px solid rgba(245, 192, 90, 0.46);
  transition: 200ms ease;
}

.cookie-switch input:checked + .cookie-slider {
  border-color: var(--cookie-gold-bright);
  box-shadow:
    inset 0 0 14px rgba(201, 148, 69, 0.16),
    0 0 14px rgba(201, 148, 69, 0.14);
}

.cookie-switch input:checked + .cookie-slider::before {
  transform: translateX(24px);
  background: radial-gradient(circle at 45% 35%, #fff1bb, #d6a04b 46%, #4d3211 100%);
  box-shadow:
    0 0 12px rgba(245, 192, 90, 0.58),
    0 0 24px rgba(201, 148, 69, 0.26);
}

.cookie-switch input:disabled + .cookie-slider {
  cursor: not-allowed;
  opacity: 0.72;
}

.cookie-modal-actions {
  margin-top: 20px;
}

/* Optional footer/settings link styling */
.cookie-settings-link {
  color: var(--cookie-gold);
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  text-decoration: none;
}

.cookie-settings-link:hover {
  color: #fff1bb;
  text-shadow: 0 0 12px rgba(245, 192, 90, 0.36);
}

@media (max-width: 680px) {
  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-actions .cookie-btn {
    flex: 1 1 100%;
  }

  .cookie-option {
    align-items: flex-start;
  }

  .cookie-card {
    padding: 20px;
  }

  .cookie-modal-actions {
    justify-content: stretch;
  }

  .cookie-modal-actions .cookie-btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-btn,
  .cookie-slider,
  .cookie-slider::before {
    transition: none !important;
  }
}
