/* BRSA brand palette for Material for MkDocs
   Referenced via mkdocs.yml -> extra_css: docs/assets/brsa-theme.css
   Requires theme.palette.primary: custom and theme.palette.accent: custom
   so Material renders the [data-md-color-primary="custom"] attribute this targets. */

:root {
  --brsa-olive: #2C3E2D;
  --brsa-cream: #F5F0E8;
  --brsa-gold: #C9A84C;
}

[data-md-color-primary="custom"] {
  --md-primary-fg-color:             var(--brsa-olive);
  --md-primary-fg-color--light:      #4A5F4B;
  --md-primary-fg-color--dark:       #1D2A1E;
  --md-primary-bg-color:             var(--brsa-cream);
  --md-primary-bg-color--light:      var(--brsa-cream);
}

[data-md-color-accent="custom"] {
  --md-accent-fg-color:              var(--brsa-gold);
  --md-accent-fg-color--transparent: rgba(201, 168, 76, 0.1);
  --md-accent-bg-color:              var(--brsa-olive);
  --md-accent-bg-color--light:       var(--brsa-cream);
}

/* Header: matches the main Ghost site's style — cream background,
   olive text, no dark bar */
.md-header {
  background-color: var(--brsa-cream);
  color: var(--brsa-olive);
  box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.md-header__title,
.md-header__topic,
.md-header__button {
  color: var(--brsa-olive);
}

.md-tabs {
  background-color: var(--brsa-cream);
  color: var(--brsa-olive);
}

.md-tabs__link {
  color: var(--brsa-olive);
  opacity: 0.85;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  opacity: 1;
  color: var(--brsa-gold);
}

/* Links use gold as the accent, olive as base */
.md-typeset a {
  color: var(--brsa-olive);
}

.md-typeset a:hover {
  color: var(--brsa-gold);
}

/* Search bar tint, adjusted for the cream header background */
.md-search__input {
  background-color: rgba(44, 62, 45, 0.08);
  color: var(--brsa-olive);
}

.md-search__input::placeholder {
  color: rgba(44, 62, 45, 0.6);
}

.md-search__icon {
  color: var(--brsa-olive);
}

/* Table headers, matching the document metadata tables used across
   POL/PROC/STD/REG/TMP/ADR documents */
.md-typeset table:not([class]) th {
  background-color: var(--brsa-olive);
  color: var(--brsa-cream);
}

/* Footer */
.md-footer {
  background-color: var(--brsa-olive);
}

/* Body background, matching the cream used on the main Ghost site */
.md-main {
  background-color: var(--brsa-cream);
}

/* Sidebar nav: active/current item picked out in gold, matching
   the accent used for interactive elements on the main site */
.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover {
  color: var(--brsa-gold);
}

.md-nav__item .md-nav__link--active {
  font-weight: 700;
}

/* Sidebar background: match the cream body so there's no visible seam
   between the nav column and the main content area */
.md-sidebar__scrollwrap,
.md-nav {
  background-color: var(--brsa-cream);
}

/* Sidebar site title (shown at top of the nav column) was inheriting
   low-contrast grey; set it to olive so it's readable against cream.
   Higher specificity needed to beat Material's own .md-nav--primary rule. */
.md-nav--primary .md-nav__title,
.md-nav__title {
  color: var(--brsa-olive) !important;
  background-color: var(--brsa-cream) !important;
}

/* Active nav item: Material's default light-grey highlight box clashed
   against the cream background; use a soft gold tint instead */
.md-nav__link--active {
  background-color: rgba(201, 168, 76, 0.15);
  border-radius: 4px;
}
