/* --------------------------------------------------------------------------
   SHARDIAN DOCUMENTATION - CUSTOM OVERRIDES FOR MATERIAL THEME
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* Light & Dark Custom Color Palettes */
:root, [data-md-color-primary="custom"] {
  --md-primary-fg-color: #0a0808 !important;         /* Dark Shardian Navbar background */
  --md-primary-fg-color--dark: #070505 !important;
  --md-primary-fg-color--light: #bc4f4b !important;
}

:root, [data-md-color-accent="custom"] {
  --md-accent-fg-color: #ff7a70 !important;           /* Coral Peach Accent */
  --md-accent-fg-color--transparent: rgba(255, 122, 112, 0.15) !important;
}

/* Light Mode Overrides */
[data-md-color-scheme="default"] {
  --md-default-fg-color: #1d1d1f !important;
  --md-default-bg-color: #ffffff !important;
  --md-default-bg-color--light: #f5f5f7 !important;
  --md-default-bg-color--dark: #e8e8ed !important;
  --md-code-bg-color: #f5f5f7 !important;
  --md-border-color: rgba(188, 79, 75, 0.12) !important;
}

/* Dark Mode Overrides (Shardian Deep Dark Theme) */
[data-md-color-scheme="slate"] {
  --md-default-fg-color: #f5f5f5 !important;
  --md-default-bg-color: #0a0808 !important;          /* Warm deep charcoal-black */
  --md-default-bg-color--light: #0f0c0c !important;    /* Container/sidebar gray */
  --md-default-bg-color--dark: #070505 !important;
  --md-code-bg-color: #0f0c0c !important;
  --md-border-color: rgba(188, 79, 75, 0.15) !important; /* Rust-tinted border */
}

/* Base Styles & Typography */
body, input, select, textarea {
  font-family: var(--font-sans) !important;
}

code, kbd, pre {
  font-family: var(--font-mono) !important;
}

/* Premium Navigation Header Customization */
.md-header {
  border-bottom: 1px solid rgba(188, 79, 75, 0.3) !important;
  background-color: #0a0808 !important;
}

/* Top Navigation Tabs (Accenture-style flat tabs) */
.md-tabs {
  background-color: #0a0808 !important;
  border-bottom: 1px solid rgba(188, 79, 75, 0.15) !important;
}

.md-tabs__link {
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #a6a6a6 !important;
  transition: color 250ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-bottom: 2px solid transparent !important;
}

.md-tabs__link--active, .md-tabs__link:hover {
  color: #ff7a70 !important;
}

/* Absolute Rigid Layout: Remove all rounded corners */
.md-search__input,
.md-search__form,
.md-code__copy,
.md-typeset pre,
.md-typeset code,
.md-typeset .admonition,
.md-typeset .tabbed-set,
.md-typeset .tabbed-labels,
.md-typeset table,
.md-button,
.md-select__inner,
.md-language-switcher select {
  border-radius: 0 !important;
}

/* Custom Webkit Scrollbars matching Shardian brand */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(188, 79, 75, 0.3);
  border-radius: 0 !important; /* Rigid */
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(188, 79, 75, 0.5);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* Headings: Accenture division style top-border */
.md-content h1 {
  border-top: 1px solid var(--md-border-color);
  border-bottom: none !important;
  padding-top: 1.5em;
  padding-bottom: 0.5em;
  margin-top: 0;
  margin-bottom: 1em;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: var(--md-primary-fg-color--light);
}

.md-content h2 {
  border-top: 1px solid var(--md-border-color);
  padding-top: 1.2em;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.md-content h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
}

/* Color customization for lists and links */
.md-typeset a {
  color: #ff7a70 !important;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.md-typeset a:hover {
  color: #bc4f4b !important;
}

/* Admonitions styling overrides */
.md-typeset .admonition {
  border-left-color: #bc4f4b !important;
  background-color: rgba(188, 79, 75, 0.03) !important;
}

.md-typeset .admonition-title {
  background-color: rgba(188, 79, 75, 0.08) !important;
  border-left-color: #bc4f4b !important;
  font-weight: 700 !important;
}

.md-typeset .admonition.note {
  border-left-color: #ff7a70 !important;
  background-color: rgba(255, 122, 112, 0.03) !important;
}

.md-typeset .admonition.note .admonition-title {
  background-color: rgba(255, 122, 112, 0.08) !important;
  border-left-color: #ff7a70 !important;
}

/* Table styling: rigid, sleek, matching corporate reports */
.md-typeset table:not([class]) {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid var(--md-border-color) !important;
}

.md-typeset table:not([class]) th {
  background-color: rgba(188, 79, 75, 0.1) !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--md-border-color) !important;
}

.md-typeset table:not([class]) td {
  border: 1px solid var(--md-border-color) !important;
}

/* Inline code tags matching the branding */
.md-typeset code {
  background-color: var(--md-default-bg-color--light) !important;
  color: #ff7a70 !important;
  padding: 0.1em 0.3em;
  font-size: 0.85em;
  border: 1px solid rgba(188, 79, 75, 0.1) !important;
}

/* Custom styling for MathJax LaTeX blocks */
.MathJax_Display, .MathJax {
  color: #f5f5f5 !important;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Clean rigid search bar positioning */
.md-search__form {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(188, 79, 75, 0.2) !important;
}

.md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Sidebar and navigation list adjustments */
.md-nav__link {
  font-weight: 500 !important;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.md-nav__link--active {
  color: #ff7a70 !important;
  font-weight: 700 !important;
}

.md-nav__link:hover {
  color: #bc4f4b !important;
}
