/* =========================================================
   PerfectGym docs skin — cerulean + navy, calm enterprise
   ========================================================= */

:root {
  --md-primary-fg-color:        #058AD7;
  --md-primary-fg-color--light: #3AA8E6;
  --md-primary-fg-color--dark:  #0B3D66;
  --md-accent-fg-color:         #F5A623;
  --md-accent-fg-color--transparent: rgba(245, 166, 35, 0.1);
  --md-typeset-a-color:         #058AD7;

  --pg-surface: #FFFFFF;
  --pg-bg:      #F3F6F9;
  --pg-text:    #0F1E2C;
  --pg-muted:   #5A6B7A;
  --pg-radius:  8px;
  --pg-shadow:  0 2px 8px rgba(11, 61, 102, 0.06);
  --pg-border:  1px solid #E3EAF0;
}

/* Header: solid navy for authority */
.md-header {
  background: #0B3D66;
  box-shadow: 0 2px 8px rgba(11, 61, 102, 0.1);
}

/* Tabs: cerulean primary */
.md-tabs {
  background: #058AD7;
}

/* Body background — cool neutral */
[data-md-color-scheme="default"] .md-main {
  background: var(--pg-bg);
}

/* Typography — single family for uniformity */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: Manrope, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.005em;
}

/* #0B3D66 fails WCAG AA contrast on the dark slate background, so it's
   scoped to the light (default) scheme; slate falls back to the theme's
   own default heading color. */
[data-md-color-scheme="default"] .md-typeset h1,
[data-md-color-scheme="default"] .md-typeset h2,
[data-md-color-scheme="default"] .md-typeset h3,
[data-md-color-scheme="default"] .md-typeset h4 {
  color: #0B3D66;
}

.md-typeset h1 {
  border-bottom: 3px solid #058AD7;
  padding-bottom: 0.4em;
  display: inline-block;
}

/* Cards & admonitions — tighter, with borders */
.md-typeset .admonition,
.md-typeset details,
.md-typeset .grid.cards > * {
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
  border: var(--pg-border);
  background: var(--pg-surface);
}

.md-typeset .admonition-title,
.md-typeset summary {
  border-radius: var(--pg-radius) var(--pg-radius) 0 0;
  font-weight: 600;
}

/* Buttons — flat, professional */
.md-typeset a.md-button {
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.md-typeset a.md-button--primary {
  background: #058AD7;
  border: none;
  color: white;
}

.md-typeset a.md-button--primary:hover {
  background: #0B3D66;
}

/* Code */
.md-typeset code {
  border-radius: 4px;
  background: rgba(5, 138, 215, 0.08);
  color: #0B3D66;
  font-weight: 500;
}

.md-typeset pre > code {
  border-radius: var(--pg-radius);
  background: #0F1E2C;
}

/* Tables — enterprise style */
.md-typeset table:not([class]) {
  border-radius: var(--pg-radius);
  overflow: hidden;
  box-shadow: var(--pg-shadow);
}

.md-typeset table:not([class]) th {
  background: #0B3D66;
  color: white;
  font-weight: 600;
}

/* Search */
.md-search__input {
  border-radius: 6px;
}

/* Nav */
.md-nav__title {
  font-family: Manrope, sans-serif;
  font-weight: 700;
  color: #0B3D66;
}

/* Footer */
.md-footer {
  background: #0B3D66;
}

.md-footer-meta {
  background: #061F35;
}

/* SchemaSpy embed — fill the content area, near-full viewport height */
.md-typeset .schemaspy-embed {
  display: block;
  width: 100%;
  height: calc(100vh - 9rem);
  min-height: 30rem;
  border: var(--pg-border);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
}

/* Data Model page (contains the embed): let it use the full width.
   With `hide: navigation` + `hide: toc` both sidebars are gone, so remove
   the grid's max-width and the article's max-width constraints. */
.md-main__inner:has(.schemaspy-embed),
.md-grid:has(.schemaspy-embed) {
  max-width: none;
}

.md-content:has(.schemaspy-embed) {
  max-width: none;
}

/* Hide the auto-generated page title (H1) on the embed page so the
   SchemaSpy view starts right below the top bar. Material injects an H1
   from the page title even when the Markdown has none. */
.md-typeset:has(.schemaspy-embed) > h1 {
  display: none;
}
