/* ========================================
   EXCALIBUR BRAND TOKENS
   Single source of truth for brand colors.
   Maps getexcalibur.com design tokens to
   MkDocs Material CSS custom properties.
   ======================================== */

/* ── Dark mode (primary brand identity) ── */
[data-md-color-scheme="slate"] {

  /* Core brand colors */
  --md-primary-fg-color:            hsl(196, 100%, 14%);   /* Deep Ocean Blue 1 — primary brand identity */
  --md-primary-fg-color--light:     hsl(210, 50%, 40%);    /* Sapphire Blue — hover/emphasis */
  --md-primary-fg-color--dark:      hsl(196, 100%, 14%);   /* Same as primary */
  --md-primary-bg-color:            hsl(180, 10%, 92%);    /* Text on primary bg */
  --md-accent-fg-color:             hsl(180, 100%, 53%);   /* Cyan — CTAs, links, highlights */
  --md-accent-fg-color--transparent: hsla(180, 100%, 53%, 0.1);
  --md-accent-bg-color:             hsl(180, 100%, 53%);
  --md-accent-bg-color--light:      hsla(180, 100%, 53%, 0.1);

  /* Surfaces */
  --md-default-bg-color:            hsl(215, 49%, 7%);     /* Deep Navy Blue — page bg */
  --md-default-bg-color--light:     hsl(226, 38%, 12%);    /* Deep Ocean Blue 2 — card surfaces */
  --md-code-bg-color:               hsl(226, 38%, 12%);    /* Code blocks & alt sections */

  /* Typography */
  --md-default-fg-color:            hsl(180, 10%, 92%);    /* Primary text */
  --md-default-fg-color--light:     hsl(215, 12%, 55%);    /* Muted text */
  --md-default-fg-color--lighter:   hsl(219, 20%, 21%);    /* Borders */
  --md-default-fg-color--lightest:  hsla(0, 0%, 100%, 0.08); /* Subtle dividers */

  /* Typeset (content area text) */
  --md-typeset-color:               hsl(180, 10%, 92%);

  /* Footer */
  --md-footer-bg-color:             hsl(215, 49%, 7%);
  --md-footer-bg-color--dark:       hsl(226, 38%, 12%);
  --md-footer-fg-color:             hsl(180, 10%, 92%);
  --md-footer-fg-color--light:      hsl(215, 12%, 55%);
  --md-footer-fg-color--lighter:    hsla(0, 0%, 100%, 0.3);
}

/* ── Header & tabs — deep navy with subtle cyan glow ── */
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-header--shadow,
[data-md-color-scheme="slate"] .md-header--shadow.md-header--lifted {
  background-color: hsl(215, 49%, 7%) !important;
  box-shadow: none !important;
}

[data-md-color-scheme="slate"] .md-tabs {
  background-color: hsl(215, 49%, 7%);
  border-bottom: 1px solid hsla(180, 100%, 53%, 0.08);
  box-shadow: 0 4px 6px -2px hsla(180, 100%, 53%, 0.10);
}

/* ── Search bar — visible on dark backgrounds ── */
@media screen and (min-width: 60em) {
  [data-md-color-scheme="slate"] .md-search__form {
    background-color: hsla(226, 38%, 12%, 0.8);
    border: 1px solid hsla(180, 100%, 53%, 0.15);
    border-radius: 0.25rem;
  }

  [data-md-color-scheme="slate"] .md-search__form:hover {
    border-color: hsla(180, 100%, 53%, 0.30);
  }
}

[data-md-color-scheme="slate"] .md-tabs__link:hover,
[data-md-color-scheme="slate"] .md-tabs__link:focus,
[data-md-color-scheme="slate"] .md-tabs__link--active {
  color: hsl(180, 100%, 53%);
}

/* ── Back-to-top button — dark text on cyan hover ── */
[data-md-color-scheme="slate"] .md-top:hover {
  background-color: hsl(180, 100%, 53%);
  color: hsl(215, 49%, 7%);
}

/* ── Cookie consent banner ── */
[data-md-color-scheme="slate"] .md-consent__overlay {
  background-color: hsla(215, 49%, 7%, 0.85);
}

[data-md-color-scheme="slate"] .md-consent__inner {
  background-color: hsl(226, 38%, 12%);
  border-top: 1px solid hsla(180, 100%, 53%, 0.12);
  box-shadow: 0 -8px 32px hsla(180, 100%, 53%, 0.08);
}

[data-md-color-scheme="slate"] .md-consent__form h4 {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: hsl(180, 10%, 92%);
}

[data-md-color-scheme="slate"] .md-consent__form h4::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  /* Lucide cookie icon as inline SVG data URI */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='hsl(180,100%25,53%25)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01'/%3E%3Cpath d='M16 15.5v.01'/%3E%3Cpath d='M12 12v.01'/%3E%3Cpath d='M11 17v.01'/%3E%3Cpath d='M7 14v.01'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

[data-md-color-scheme="slate"] .md-consent__form p {
  color: hsl(215, 12%, 55%);
}

[data-md-color-scheme="slate"] .md-consent__form .md-button {
  background-color: transparent;
  border: 1px solid hsla(180, 100%, 53%, 0.20);
  color: hsl(180, 10%, 92%);
  border-radius: 8px;
  transition: all 0.2s ease;
}

[data-md-color-scheme="slate"] .md-consent__form .md-button:hover {
  border-color: hsl(180, 100%, 53%);
  color: hsl(180, 100%, 53%);
  box-shadow: 0 0 12px hsla(180, 100%, 53%, 0.15);
}

[data-md-color-scheme="slate"] .md-consent__form .md-button--primary {
  background-color: hsl(180, 100%, 53%);
  border-color: hsl(180, 100%, 53%);
  color: hsl(215, 49%, 7%);
}

[data-md-color-scheme="slate"] .md-consent__form .md-button--primary:hover {
  background-color: hsl(180, 100%, 60%);
  border-color: hsl(180, 100%, 60%);
  color: hsl(215, 49%, 7%);
  box-shadow: 0 0 16px hsla(180, 100%, 53%, 0.30);
}

[data-md-color-scheme="slate"] .md-consent__settings {
  border-color: hsla(180, 100%, 53%, 0.08);
}

[data-md-color-scheme="slate"] .md-consent__form .task-list-indicator::before {
  border-color: hsla(180, 100%, 53%, 0.30);
}

[data-md-color-scheme="slate"] .md-consent__form input[type="checkbox"]:checked + .task-list-indicator::before {
  background-color: hsl(180, 100%, 53%);
}

/* ── Excalibur custom tokens (all schemes) ── */
:root {
  /* Glow effects */
  --xcl-accent-glow:            hsla(180, 100%, 53%, 0.25);
  --xcl-accent-glow-subtle:     hsla(180, 100%, 53%, 0.10);

  /* Secondary accent */
  --xcl-amber:                  hsl(43, 96%, 56%);
}
