/* Extra styles for MkDocs Material theme */

/* Primary color customization for Microsoft Fabric branding */
:root {
  --md-primary-fg-color: #0078d4;
  --md-primary-fg-color--light: #106ebe;
  --md-primary-fg-color--dark: #005a9e;
  --md-accent-fg-color: #ffb900;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #3b82f6;
  --md-accent-fg-color: #fbbf24;
}

/* Admonition customization */
.md-typeset .admonition.casino,
.md-typeset details.casino {
  border-color: #10b981;
}
.md-typeset .casino > .admonition-title,
.md-typeset .casino > summary {
  background-color: rgba(16, 185, 129, 0.1);
}
.md-typeset .casino > .admonition-title::before,
.md-typeset .casino > summary::before {
  background-color: #10b981;
  -webkit-mask-image: var(--md-admonition-icon--tip);
  mask-image: var(--md-admonition-icon--tip);
}

/* Gaming/Compliance admonition */
.md-typeset .admonition.compliance,
.md-typeset details.compliance {
  border-color: #ef4444;
}
.md-typeset .compliance > .admonition-title,
.md-typeset .compliance > summary {
  background-color: rgba(239, 68, 68, 0.1);
}
.md-typeset .compliance > .admonition-title::before,
.md-typeset .compliance > summary::before {
  background-color: #ef4444;
  -webkit-mask-image: var(--md-admonition-icon--warning);
  mask-image: var(--md-admonition-icon--warning);
}

/* Better table styling */
.md-typeset table:not([class]) {
  font-size: 0.85rem;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: white;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color--dark);
}

/* Code block improvements */
.md-typeset pre > code {
  font-size: 0.8rem;
}

/* Mermaid diagram sizing */
.mermaid {
  text-align: center;
  margin: 1rem 0;
}

/* Navigation improvements */
.md-nav__link {
  font-size: 0.75rem;
}

/* Footer styling */
.md-footer-meta {
  background-color: var(--md-primary-fg-color--dark);
}

/* Custom .hero/.grid/.card replaced by Material built-in grid cards + docs.css */

/* Badge styling */
.md-typeset .badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  margin-right: 0.25rem;
}

.md-typeset .badge-fabric {
  background-color: #0078d4;
  color: white;
}

.md-typeset .badge-casino {
  background-color: #10b981;
  color: white;
}

.md-typeset .badge-compliance {
  background-color: #ef4444;
  color: white;
}

/* Tutorial duration badges */
.md-typeset .duration {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: var(--md-accent-fg-color);
  color: black;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ── Auto dark mode for browser/OS preference ──────────────── */
/* When a user's browser requests dark mode and no manual toggle
   has been clicked, apply the slate scheme automatically.       */
@media (prefers-color-scheme: dark) {
  :root:not([data-md-color-switching]) body:not([data-md-color-scheme="default"]) {
    /* Fallback dark vars for elements rendered before JS runs */
    --md-default-bg-color: #1e1e1e;
    --md-default-fg-color: #e0e0e0;
    --md-code-bg-color: #2d2d2d;
  }
}

/* Ensure tables remain readable in dark mode */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) td,
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  border-color: rgba(255, 255, 255, 0.12);
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Dark mode badge visibility */
[data-md-color-scheme="slate"] .md-typeset img[src*="shields.io"] {
  filter: brightness(1.1);
}

/* Dark mode card styling now handled by Material built-in grid cards + docs.css */

/* Dark mode admonition tweaks */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Dark mode code in tables */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) code {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Dark mode duration badge */
[data-md-color-scheme="slate"] .md-typeset .duration {
  background-color: #b8860b;
  color: #fff;
}

/* Responsive adjustments for custom components handled in docs.css */
