/* =========================================================
   Magicline docs skin — deep indigo → violet, electric cyan
   ========================================================= */

:root {
  --md-primary-fg-color:        #1E2A78;
  --md-primary-fg-color--light: #6B3FA0;
  --md-primary-fg-color--dark:  #141B54;
  --md-accent-fg-color:         #00E0FF;
  --md-accent-fg-color--transparent: rgba(0, 224, 255, 0.1);
  --md-typeset-a-color:         #6B3FA0;

  --ml-surface:  #FFFFFF;
  --ml-bg:       #F5F6FB;
  --ml-text:     #0B1220;
  --ml-muted:    #5B6478;
  --ml-radius:   14px;
  --ml-shadow:   0 8px 24px rgba(30, 42, 120, 0.08);
  --ml-gradient: linear-gradient(135deg, #1E2A78 0%, #6B3FA0 100%);
}

/* Header uses brand gradient */
.md-header {
  background: var(--ml-gradient);
  box-shadow: 0 4px 20px rgba(30, 42, 120, 0.15);
}

.md-tabs {
  background: rgba(20, 27, 84, 0.95);
}

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

/* Typography */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: "Space Grotesk", Inter, -apple-system, sans-serif;
  letter-spacing: -0.01em;
  font-weight: 700;
}

[data-md-color-scheme="default"] .md-typeset h1 {
  background: var(--ml-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-md-color-scheme="slate"] .md-typeset h1 {
  color: var(--md-default-fg-color);
}

/* Cards & admonitions — rounded, soft shadow, no borders */
.md-typeset .admonition,
.md-typeset details,
.md-typeset .grid.cards > * {
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-shadow);
  border: none;
  background: var(--ml-surface);
}

.md-typeset .admonition-title,
.md-typeset summary {
  border-radius: var(--ml-radius) var(--ml-radius) 0 0;
}

/* Buttons */
.md-typeset a.md-button {
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.md-typeset a.md-button--primary {
  background: var(--ml-gradient);
  border: none;
  color: white;
}

.md-typeset a.md-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(107, 63, 160, 0.35);
}

/* Code blocks */
.md-typeset code {
  border-radius: 6px;
  background: rgba(0, 224, 255, 0.08);
  color: #6B3FA0;
  font-weight: 500;
}

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

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

/* Links */
.md-typeset a {
  transition: color 0.15s ease;
}

.md-typeset a:hover {
  color: var(--md-accent-fg-color);
}

/* Nav */
.md-nav__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

/* Footer */
.md-footer {
  background: #141B54;
}

.md-footer-meta {
  background: #0B1220;
}

/* 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: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-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;
}
