/* Consularis Docs — custom Material theme tweaks */

:root {
  --md-primary-fg-color: #1a1a1a;
  --md-primary-fg-color--light: #2a2a2a;
  --md-primary-fg-color--dark: #111111;
  --md-accent-fg-color: #f97316;
  --consularis-orange: #f97316;
  --md-typeset-a-color: #f97316;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0f0f0f;
  --md-code-bg-color: #1a1a1a;
  --md-primary-fg-color: #0f0f0f;
  --md-typeset-a-color: #f97316;
  --md-accent-fg-color: #f97316;
}

[data-md-color-scheme="default"] {
  --md-typeset-a-color: #ea6c0a;
  --md-accent-fg-color: #ea6c0a;
}

/* ── Wordmark ─────────────────────────────────────────────── */
.consularis-wordmark {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.consularis-docs-suffix {
  color: var(--consularis-orange);
  margin-left: 1px;
}

/* Make the header link not inherit the blue underline */
.md-header__button.md-logo {
  padding: 0;
  margin-right: 0.25rem;
}

/* ── Header — slim, dark, clean ───────────────────────────── */
.md-header {
  background-color: #111111;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

[data-md-color-scheme="default"] .md-header {
  background-color: #111111;
}

/* Hide the dynamic page title (the second text that changes per page) */
.md-header__title {
  display: none;
}

/* Center the search bar — push everything to the sides */
.md-header__inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.md-search {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
}

/* Source (GitHub icon) before the palette toggle */
.md-header__source {
  order: 4;
  white-space: nowrap;
  width: auto;
}

/* Palette toggle (sun/moon) pushed to very right */
.md-header__option {
  order: 5;
  margin-left: 0;
}

/* ── Search bar styling ──────────────────────────────────── */
.md-search__form {
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.md-search__form:hover,
.md-search__form:focus-within {
  background: rgba(255,255,255,0.12);
  border-color: var(--consularis-orange);
}

.md-search__input::placeholder {
  color: rgba(255,255,255,0.45);
}

/* ── Right sidebar (TOC) ─────────────────────────────────── */
.md-nav__link--active {
  color: var(--consularis-orange) !important;
}

.md-nav--secondary .md-nav__link--active {
  color: var(--consularis-orange) !important;
  font-weight: 500;
}

/* ── Left sidebar ─────────────────────────────────────────── */
.md-nav__item--active > .md-nav__link {
  color: var(--consularis-orange);
  font-weight: 600;
}

/* Hide site name from sidebar drawer title */
.md-nav--primary .md-nav__title[for="__drawer"] {
  display: none;
}

/* Hide logo from sidebar drawer */
.md-nav--primary .md-nav__title .md-nav__button {
  display: none;
}

/* Password gate — make it feel native */
.consularis-password-input {
  width: 100%;
  max-width: 360px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 6px;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font-size: 0.95rem;
  font-family: inherit;
}

.consularis-password-input:focus {
  outline: none;
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.consularis-password-button {
  margin-left: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--md-primary-fg-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.consularis-password-button:hover {
  background: var(--md-primary-fg-color--dark);
}

/* Tighten admonition styling */
.md-typeset .admonition,
.md-typeset details {
  border-left-width: 3px;
}

/* Make tables scroll horizontally on mobile cleanly */
.md-typeset__table {
  margin: 1em 0;
}
