/* ==========================================================================
   Moveris Design System for MkDocs Material

   ONLY customizes colors, fonts, and component appearance.
   Does NOT modify layout - uses MkDocs Material defaults.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font Import
   -------------------------------------------------------------------------- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --moveris-navy: #0a1628;
  --moveris-navy-light: #1e3a5f;
  --moveris-green: #00E599;
  --moveris-orange: #f97316;
  --moveris-yellow: #fbbf24;
  --moveris-light-blue: #00A3FF;
  --moveris-gray: #6b7280;

  --code-bg: #0a1628;
  --code-fg: #e4f1fe;
}

/* --------------------------------------------------------------------------
   Dark Mode Theme Colors
   -------------------------------------------------------------------------- */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--moveris-navy);
  --md-primary-fg-color--light: var(--moveris-navy-light);
  --md-primary-fg-color--dark: #050d17;
  --md-accent-fg-color: var(--moveris-green);
  --md-default-bg-color: #0f172a;
  --md-default-bg-color--light: #1e293b;
  --md-default-bg-color--lighter: #334155;
  --md-default-bg-color--lightest: #475569;
  --md-default-fg-color: rgba(255, 255, 255, 0.87);
  --md-default-fg-color--light: rgba(255, 255, 255, 0.54);
  --md-default-fg-color--lighter: rgba(255, 255, 255, 0.32);
  --md-default-fg-color--lightest: rgba(255, 255, 255, 0.12);
  --md-code-bg-color: var(--code-bg);
  --md-code-fg-color: var(--code-fg);
  --md-typeset-a-color: var(--moveris-green);
}

/* --------------------------------------------------------------------------
   Light Mode Theme Colors
   -------------------------------------------------------------------------- */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--moveris-navy);
  --md-accent-fg-color: #059669;
  --md-typeset-a-color: #059669;
  --md-code-bg-color: var(--code-bg);
  --md-code-fg-color: var(--code-fg);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.md-typeset {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 700;
}

.md-typeset h1 {
  font-size: 1.6rem;
}

.md-typeset h2 {
  font-size: 1.2rem;
}

.md-typeset h3 {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.md-header {
  background-color: var(--moveris-navy);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 2.5rem;
  width: auto;
}

.md-tabs {
  background-color: var(--moveris-navy);
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.md-nav__link--active {
  color: var(--moveris-green) !important;
}

/* --------------------------------------------------------------------------
   Code Blocks
   -------------------------------------------------------------------------- */
.md-typeset code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background-color: var(--code-bg);
  color: var(--moveris-green);
}

.md-typeset pre > code {
  font-size: 0.75rem;
}

/* Syntax highlighting */
.highlight .c, .highlight .c1, .highlight .cm { color: var(--moveris-gray); }
.highlight .s, .highlight .s1, .highlight .s2 { color: var(--moveris-yellow); }
.highlight .k, .highlight .kn, .highlight .kd { color: var(--moveris-light-blue); }
.highlight .nf, .highlight .nc { color: var(--moveris-green); }
.highlight .mi, .highlight .mf { color: var(--moveris-orange); }

/* --------------------------------------------------------------------------
   Admonitions
   -------------------------------------------------------------------------- */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: var(--moveris-green);
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: var(--moveris-orange);
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: var(--moveris-light-blue);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.md-typeset .md-button--primary {
  background-color: var(--moveris-green);
  color: var(--moveris-navy);
  border: none;
}

.md-typeset .md-button--primary:hover {
  background-color: #00cc88;
}

/* --------------------------------------------------------------------------
   Custom Components
   -------------------------------------------------------------------------- */

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--moveris-navy) 0%, var(--moveris-navy-light) 100%);
  padding: 2rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
  color: white !important;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  border: none !important;
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin: 0 auto 1rem;
}

.hero-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons a {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 600;
}

.hero-buttons .md-button--primary {
  background-color: var(--moveris-green);
  color: var(--moveris-navy);
}

.hero-buttons .md-button--secondary {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.feature-card {
  padding: 0.75rem;
  border-radius: 0.375rem;
  background-color: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
}

.feature-card h3 {
  font-size: 0.8rem;
  margin: 0 0 0.25rem 0;
}

.feature-card p {
  font-size: 0.7rem;
  margin: 0;
  color: var(--md-default-fg-color--light);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.stat-value {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--moveris-green);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--md-default-fg-color--light);
}

/* Capture Timing callout (frame-capture.md) */
.capture-timing-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 2rem;
  margin: 1.5rem 0;
  text-align: center;
  background: var(--md-code-bg-color);
  border-radius: 0.5rem;
  border-left: 4px solid var(--moveris-green);
}

.capture-timing-callout__value {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--moveris-green);
  letter-spacing: -0.02em;
}

.capture-timing-callout__label {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
}

/* Endpoint Header */
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.25rem;
  margin: 1rem 0;
}

.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

/* Method Badges */
.method-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.method-badge.get {
  background-color: var(--moveris-navy-light);
  color: white;
}

.method-badge.post {
  background-color: var(--moveris-green);
  color: var(--moveris-navy);
}

/* Response Fields table: Field/Option/Property column on one line, no mid-word breaks */
.md-typeset .response-fields-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.md-typeset .response-fields-table table {
  table-layout: auto;
  min-width: max-content;
}
.md-typeset .response-fields-table th:first-child,
.md-typeset .response-fields-table td:first-child {
  white-space: nowrap !important;
  min-width: 14em !important;
  width: 1% !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}
.md-typeset .response-fields-table th:first-child code,
.md-typeset .response-fields-table td:first-child code {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

/* Other columns: allow wrapping to 2–3 lines */
.md-typeset .response-fields-table th:not(:first-child),
.md-typeset .response-fields-table td:not(:first-child) {
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 26em;
}

/* SDK parameter tables on the LivenessClient page only:
   keep first two columns' inline code on one line */
article.md-content__inner.md-typeset:has(h1#livenessclient) table th:nth-child(1) code,
article.md-content__inner.md-typeset:has(h1#livenessclient) table th:nth-child(2) code,
article.md-content__inner.md-typeset:has(h1#livenessclient) table td:nth-child(1) code,
article.md-content__inner.md-typeset:has(h1#livenessclient) table td:nth-child(2) code {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* React Native Components page only: props tables – one line per cell, horizontal scroll */
article.md-content__inner.md-typeset:has(h1#react-native-components) table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  min-width: max-content;
}
article.md-content__inner.md-typeset:has(h1#react-native-components) table th:nth-child(1) code,
article.md-content__inner.md-typeset:has(h1#react-native-components) table td:nth-child(1) code,
article.md-content__inner.md-typeset:has(h1#react-native-components) table th:nth-child(2) code,
article.md-content__inner.md-typeset:has(h1#react-native-components) table td:nth-child(2) code {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* React Native: only LivenessOverlay props table (2nd) – Type column wraps, breaks at spaces (after \|) */
article.md-content__inner.md-typeset:has(h1#react-native-components) table:nth-of-type(2) {
  display: table;
  overflow-x: visible;
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
article.md-content__inner.md-typeset:has(h1#react-native-components) table:nth-of-type(2) th:nth-child(2),
article.md-content__inner.md-typeset:has(h1#react-native-components) table:nth-of-type(2) td:nth-child(2) {
  max-width: 14em;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
article.md-content__inner.md-typeset:has(h1#react-native-components) table:nth-of-type(2) th:nth-child(2) code,
article.md-content__inner.md-typeset:has(h1#react-native-components) table:nth-of-type(2) td:nth-child(2) code {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

/* React (web) Components page only: same props table styling + horizontal scroll */
article.md-content__inner.md-typeset:has(h1#react-components) table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  min-width: max-content;
}
article.md-content__inner.md-typeset:has(h1#react-components) table th:nth-child(1) code,
article.md-content__inner.md-typeset:has(h1#react-components) table td:nth-child(1) code,
article.md-content__inner.md-typeset:has(h1#react-components) table th:nth-child(2) code,
article.md-content__inner.md-typeset:has(h1#react-components) table td:nth-child(2) code {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* React Components: LivenessView "Props" table (1st table) – Description wraps, scroll si no cabe */
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type {
  overflow-x: auto !important;
}
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type table {
  display: table !important;
  min-width: 52em !important;
  width: 100% !important;
  table-layout: fixed !important;
}
/* Prop, Type, Default: anchos mínimos para no solaparse */
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type th:nth-child(1),
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type td:nth-child(1) { width: 9em !important; min-width: 9em !important; }
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type th:nth-child(2),
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type td:nth-child(2) { width: 20em !important; min-width: 20em !important; }
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type th:nth-child(3),
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type td:nth-child(3) { width: 8em !important; min-width: 8em !important; }
/* Description: ancho fijo, permite wrap */
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type th:nth-child(4),
article.md-content__inner.md-typeset:has(h1#react-components) .md-typeset__scrollwrap:first-of-type td:nth-child(4) {
  width: 18em !important;
  min-width: 18em !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  text-overflow: unset !important;
}

/* React Components: only LivenessOverlay "Props" table (h3#props_3 + table) */
article.md-content__inner.md-typeset:has(h1#react-components) h3#props_3 + table {
  display: table !important;
  overflow-x: visible !important;
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}
article.md-content__inner.md-typeset:has(h1#react-components) h3#props_3 + table td:nth-child(2),
article.md-content__inner.md-typeset:has(h1#react-components) h3#props_3 + table th:nth-child(2) {
  max-width: 14em !important;
  width: 14em !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
article.md-content__inner.md-typeset:has(h1#react-components) h3#props_3 + table td:nth-child(2) code,
article.md-content__inner.md-typeset:has(h1#react-components) h3#props_3 + table th:nth-child(2) code {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Tips Grid – layout by card count:
   3 cards: 1 row × 3 columns
   4 cards: 2 rows × 2 columns
   5 cards: 3 top, 2 bottom (centered)
   6 cards: 2 rows × 3 columns */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.tips-grid:has(.tip-card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.tips-grid:has(.tip-card:nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.tips-grid:has(.tip-card:nth-child(5):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.tips-grid:has(.tip-card:nth-child(5):last-child) .tip-card:nth-child(4) {
  grid-column: 2;
}

.tips-grid:has(.tip-card:nth-child(5):last-child) .tip-card:nth-child(5) {
  grid-column: 3;
}

.tips-grid:has(.tip-card:nth-child(6):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.tip-card {
  padding: 0.75rem;
  border-radius: 0.25rem;
  background-color: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
}

.tip-card h3, .tip-card h4 {
  font-size: 0.75rem;
  margin: 0 0 0.25rem 0;
}

.tip-card p {
  font-size: 0.7rem;
  margin: 0;
  color: var(--md-default-fg-color--light);
}

/* Integration Tips: body moveris-gray; glossary terms moveris-gray + dotted underline, highlight on hover only */
.integration-tips .tip-card p {
  color: var(--moveris-gray) !important;
}

.integration-tips .tip-card p a.glossary-term {
  color: var(--moveris-gray) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted currentColor;
}

.integration-tips .tip-card p a.glossary-term:hover {
  color: var(--moveris-gray) !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* Quick Start: align titles and body text across all three cards */
.quick-start-tips .tip-card {
  display: grid;
  grid-template-rows: 2.1rem auto;
  row-gap: 0.25rem;
  align-content: start;
}

.quick-start-tips .tip-card h3 {
  margin: 0;
  line-height: 1.4;
}

.quick-start-tips .tip-card p {
  margin: 0;
}

/* Prompt Cards */
.prompt-card {
  margin: 1rem 0;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.prompt-card-header {
  padding: 0.4rem 0.6rem;
  color: white;
  font-weight: 600;
  font-size: 0.7rem;
}

.prompt-card-header.lovable {
  background: linear-gradient(to right, #ec4899, #f43f5e);
}

.prompt-card-header.cursor {
  background: linear-gradient(to right, #10b981, #14b8a6);
}

.prompt-card-header.bolt {
  background: linear-gradient(to right, #f59e0b, #f97316);
}

.prompt-card-header.replit {
  background: linear-gradient(to right, #3b82f6, #6366f1);
}

/* Model Cards Grid */
.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .model-cards-grid {
    grid-template-columns: 1fr;
  }
}

.model-card {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
  position: relative;
}

.model-card h4 {
  font-size: 0.85rem;
  margin: 0 0 0.25rem 0;
}

.model-card h4 a.headerlink {
  display: none;
}

.model-card--recommended {
  border-color: var(--moveris-green);
  border-width: 2px;
}

.model-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  background-color: var(--moveris-green);
  color: var(--moveris-navy);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.model-card table {
  font-size: 0.7rem;
  margin: 0.25rem 0;
}

.model-card p {
  font-size: 0.7rem;
  margin: 0.25rem 0;
}

/* Model Comparison Table - wrapper with horizontal scroll */
.md-typeset .model-compare-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.md-typeset .model-compare-wrapper .model-compare {
  min-width: 950px;
}

/* Model Comparison Table - clean, balanced layout */
.md-typeset .model-compare {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.8125rem;
  margin: 0;
}

/* Column widths: label column + 5 equal model columns */
.md-typeset .model-compare .col-label {
  width: 22%;
}

.md-typeset .model-compare .col-model {
  width: 15.6%; /* 78% / 5 */
}

/* Header row - titles on one line */
.md-typeset .model-compare thead th {
  padding: 0.75rem 1rem;
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 2px solid var(--md-default-fg-color--lightest);
}

.md-typeset .model-compare thead th.th-label {
  text-align: left;
  padding-left: 0;
}

.md-typeset .model-compare thead th.recommended {
  color: var(--moveris-green);
}

.md-typeset .model-compare .rec-badge {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--moveris-green);
  color: var(--moveris-navy);
  padding: 0.1rem 0.35rem;
  border-radius: 1rem;
  margin-top: 0.15rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Body cells - more horizontal padding for readability */
.md-typeset .model-compare tbody td {
  padding: 0.6rem 1rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* MODEL ID row only: single line, no wrap */
.md-typeset .model-compare tbody tr.model-id-row td {
  white-space: nowrap;
}

.md-typeset .model-compare tbody td.row-label {
  text-align: left;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 0;
}

.md-typeset .model-compare tbody tr.highlight-row td {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--moveris-green);
}

.md-typeset .model-compare tbody tr.highlight-row td.row-label {
  font-size: 0.6875rem;
  color: var(--md-default-fg-color--light);
}

/* BEST FOR row: wrap between words only, never break within a word */
.md-typeset .model-compare tbody tr:last-child td {
  border-bottom: none;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.4;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.md-typeset .model-compare tbody tr:hover td {
  background-color: var(--md-default-bg-color--light);
}

/* Align code blocks in Model ID row */
.md-typeset .model-compare tbody td code {
  font-size: 0.75rem;
}

/* Hide permalink on model page titles (code in h1 causes mixed fonts) */
.md-typeset h1 code {
  font-size: inherit;
  background: none;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
}

/* Model Detail Tables (individual model pages) */
.md-typeset .model-detail {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
  margin: 1rem 0;
}

.md-typeset .model-detail td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset .model-detail td.row-label {
  width: 40%;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.md-typeset .model-detail tr.highlight-row td {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--moveris-green);
}

.md-typeset .model-detail tr.highlight-row td.row-label {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset .model-detail tbody tr:last-child td {
  border-bottom: none;
}

.md-typeset .model-detail tbody tr:hover td {
  background-color: var(--md-default-bg-color--light);
}

/* Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.comparison-card {
  padding: 1.25rem 1rem;
  border-radius: 0.5rem;
  border: 2px solid;
  font-size: 0.85rem;
}

.comparison-card h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.comparison-card ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.comparison-card li {
  margin-bottom: 0.35rem;
}

.comparison-card li:last-child {
  margin-bottom: 0;
}

.comparison-card.correct {
  border-color: var(--moveris-green);
}

.comparison-card.incorrect {
  border-color: #ef4444;
}

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

/* --------------------------------------------------------------------------
   Index Page (index.md)
   Hero buttons: Get Started (moveris-green bg + moveris-navy text), API Reference (keep bg/border + code-fg text)
   Feature grid: 2x2 layout, card titles code-fg, card body moveris-gray
   -------------------------------------------------------------------------- */
.hero-buttons .md-button--primary {
  background-color: var(--moveris-green) !important;
  color: var(--moveris-navy) !important;
  border: none;
}

.hero-buttons .md-button--primary:hover {
  background-color: #00cc88 !important;
  color: var(--moveris-navy) !important;
}

.hero-buttons .md-button--secondary {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--code-fg) !important;
}

.hero-buttons .md-button--secondary:hover {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--code-fg) !important;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

/* Feature grid layout by card count: 3→3cols, 4→2×2, 5→3+2 centered, 6→2×3 */
.feature-grid:has(.feature-card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid:has(.feature-card:nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.feature-grid:has(.feature-card:nth-child(5):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid:has(.feature-card:nth-child(5):last-child) .feature-card:nth-child(4) {
  grid-column: 2;
}

.feature-grid:has(.feature-card:nth-child(5):last-child) .feature-card:nth-child(5) {
  grid-column: 3;
}

.feature-grid:has(.feature-card:nth-child(6):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card h3 {
  font-size: 0.8rem;
  margin: 0 0 0.25rem 0;
  color: var(--code-fg) !important;
}

.feature-card p {
  font-size: 0.7rem;
  margin: 0;
  color: var(--moveris-gray) !important;
}

/* Glossary terms in feature card body: moveris-gray + dotted underline */
.md-typeset .feature-card p a.glossary-term {
  color: var(--moveris-gray) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted currentColor;
}

.md-typeset .feature-card p a.glossary-term:hover {
  color: var(--moveris-gray) !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* Glossary terms in feature card titles (h3): code-fg + dotted underline */
.md-typeset .feature-card h3 a.glossary-term,
.md-typeset .feature-card h3 a.glossary-term-in-heading {
  color: var(--code-fg) !important;
  text-decoration: none !important;
  border-bottom: 1px dotted currentColor;
}

.md-typeset .feature-card h3 a.glossary-term:hover,
.md-typeset .feature-card h3 a.glossary-term-in-heading:hover {
  color: var(--code-fg) !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* --------------------------------------------------------------------------
   JavaScript Examples Page (examples/javascript.md)
   Tab titles "JavaScript" and "TypeScript": code-fg, keep dotted underline and glossary ref
   -------------------------------------------------------------------------- */
/* REST API Examples: JavaScript/TypeScript tabs - code-fg, no underline, glossary link */
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(1),
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2),
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(1) *,
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2) *,
.javascript-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term,
.javascript-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading {
  color: var(--code-fg) !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(1):hover,
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2):hover,
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(1) *:hover,
.javascript-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2) *:hover,
.javascript-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term:hover,
.javascript-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading:hover {
  color: var(--code-fg) !important;
  border-bottom: none !important;
}

/* --------------------------------------------------------------------------
   Quick Start Page (getting-started/quick-start.md)
   JavaScript and Python tabs: no dotted underline, keep glossary link
   -------------------------------------------------------------------------- */
.quick-start-page ~ .tabbed-set .tabbed-labels a.glossary-term,
.quick-start-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading {
  text-decoration: none !important;
  border-bottom: none !important;
}

.quick-start-page ~ .tabbed-set .tabbed-labels a.glossary-term:hover,
.quick-start-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading:hover {
  border-bottom: none !important;
}

/* --------------------------------------------------------------------------
   Node.js Examples Page (examples/node.md)
   Tab titles "CommonJS", "ESM + TypeScript", "npm", "Express API": code-fg
   -------------------------------------------------------------------------- */
.node-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term,
.node-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading {
  color: var(--code-fg) !important;
  border-bottom: none !important;
  text-decoration: none !important;
}

.node-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term:hover,
.node-examples-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading:hover {
  color: var(--code-fg) !important;
  border-bottom: none !important;
}

/* ESM + TypeScript tab (2nd tab): entire label in code-fg, no link styling */
.node-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2),
.node-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2) *,
.node-examples-page ~ .tabbed-set .tabbed-labels > *:nth-child(2) a {
  color: var(--code-fg) !important;
  text-decoration: none !important;
  border-bottom: none !important;
}


/* --------------------------------------------------------------------------
   SDK Installation Page (sdk/installation.md)
   React (Web) section: pnpm and yarn tab labels - code-fg, link kept, no dotted underline
   (.installation-page is on h1; tabbed-set is a following sibling)
   -------------------------------------------------------------------------- */
.md-typeset .installation-page ~ .tabbed-set .tabbed-labels a.glossary-term,
.md-typeset .installation-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading {
  color: var(--code-fg) !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

.md-typeset .installation-page ~ .tabbed-set .tabbed-labels a.glossary-term:hover,
.md-typeset .installation-page ~ .tabbed-set .tabbed-labels a.glossary-term-in-heading:hover {
  color: var(--code-fg) !important;
  border-bottom: none !important;
}

/* --------------------------------------------------------------------------
   MCP Pages (mcp/*.md)
   Glossary terms in h1/h2/h3/h4: inherit title color. In tables: inherit surrounding text.
   -------------------------------------------------------------------------- */
.md-typeset h1.mcp-page a.glossary-term,
.md-typeset h1.mcp-page a.glossary-term-in-heading,
.md-typeset .mcp-page ~ h2 a.glossary-term,
.md-typeset .mcp-page ~ h2 a.glossary-term-in-heading,
.md-typeset .mcp-page ~ h3 a.glossary-term,
.md-typeset .mcp-page ~ h3 a.glossary-term-in-heading,
.md-typeset .mcp-page ~ h4 a.glossary-term,
.md-typeset .mcp-page ~ h4 a.glossary-term-in-heading {
  color: inherit !important;
}

.md-typeset h1.mcp-page a.glossary-term:hover,
.md-typeset h1.mcp-page a.glossary-term-in-heading:hover,
.md-typeset .mcp-page ~ h2 a.glossary-term:hover,
.md-typeset .mcp-page ~ h2 a.glossary-term-in-heading:hover,
.md-typeset .mcp-page ~ h3 a.glossary-term:hover,
.md-typeset .mcp-page ~ h3 a.glossary-term-in-heading:hover,
.md-typeset .mcp-page ~ h4 a.glossary-term:hover,
.md-typeset .mcp-page ~ h4 a.glossary-term-in-heading:hover {
  color: inherit !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

.mcp-page ~ table thead th a.glossary-term,
.mcp-page ~ table thead th a.glossary-term-in-heading,
.mcp-page ~ table tbody td a.glossary-term,
.mcp-page ~ .md-typeset__scrollwrap table thead th a.glossary-term,
.mcp-page ~ .md-typeset__scrollwrap table thead th a.glossary-term-in-heading,
.mcp-page ~ .md-typeset__scrollwrap table tbody td a.glossary-term {
  color: inherit !important;
}

.mcp-page ~ table thead th a.glossary-term:hover,
.mcp-page ~ table thead th a.glossary-term-in-heading:hover,
.mcp-page ~ table tbody td a.glossary-term:hover,
.mcp-page ~ .md-typeset__scrollwrap table thead th a.glossary-term:hover,
.mcp-page ~ .md-typeset__scrollwrap table thead th a.glossary-term-in-heading:hover,
.mcp-page ~ .md-typeset__scrollwrap table tbody td a.glossary-term:hover {
  color: inherit !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* --------------------------------------------------------------------------
   API Key Page (getting-started/api-key.md)
   Title: moveris-gray | Button: moveris-green bg + code-fg text
   -------------------------------------------------------------------------- */
.md-typeset h1.api-key-page {
  color: var(--moveris-gray) !important;
}

.md-typeset a.developer-portal-btn,
.md-typeset a.developer-portal-btn:hover {
  background-color: var(--moveris-green) !important;
  color: var(--moveris-navy-light) !important;
  border: none;
}

.md-typeset a.developer-portal-btn:hover {
  background-color: #00cc88 !important;
  color: var(--moveris-navy-light) !important;
}

/* For Decision-Makers: Developer Portal button – text color only (moveris-navy) */
.md-typeset a.developer-portal-btn-dm,
.md-typeset a.developer-portal-btn-dm:hover {
  color: var(--moveris-navy) !important;
}

/* --------------------------------------------------------------------------
   Glossary Page (glossary.md)
   Glossary terms are not linked on this page (plugin unwraps <abbr>).
   -------------------------------------------------------------------------- */

/* Content links: green (override Material's blue) */
.md-typeset a {
  color: var(--md-typeset-a-color) !important;
}

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

/* Glossary term links: body text color + dotted underline (override .md-typeset a) */
.md-typeset a.glossary-term {
  color: var(--md-default-fg-color) !important;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.md-typeset a.glossary-term:hover {
  color: var(--moveris-green) !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* Glossary in headings: inherit title color/style, keep tooltip + dotted underline */
.md-typeset h1 a.glossary-term-in-heading,
.md-typeset h2 a.glossary-term-in-heading,
.md-typeset h3 a.glossary-term-in-heading,
.md-typeset h4 a.glossary-term-in-heading {
  color: inherit !important;
}

.md-typeset h1 a.glossary-term-in-heading:hover,
.md-typeset h2 a.glossary-term-in-heading:hover,
.md-typeset h3 a.glossary-term-in-heading:hover,
.md-typeset h4 a.glossary-term-in-heading:hover {
  color: inherit !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* Glossary in table headers and admonition titles: inherit title color */
.md-typeset .model-compare thead th a.glossary-term,
.md-typeset .model-compare tbody td.row-label a.glossary-term,
.md-typeset .model-compare tbody td a.glossary-term,
.md-typeset .model-detail tbody td.row-label a.glossary-term,
.md-typeset .model-detail tbody td a.glossary-term,
.md-typeset .admonition-title a.glossary-term {
  color: inherit !important;
}

/* Explicit color for model-detail row-label cells (fixes Response etc. on lines like Avg response time) */
.md-typeset table.model-detail tbody td.row-label a.glossary-term {
  color: var(--md-default-fg-color--light) !important;
}

.md-typeset .model-compare thead th a.glossary-term:hover,
.md-typeset .model-compare tbody td.row-label a.glossary-term:hover,
.md-typeset .model-compare tbody td a.glossary-term:hover,
.md-typeset .model-detail tbody td.row-label a.glossary-term:hover,
.md-typeset .model-detail tbody td a.glossary-term:hover,
.md-typeset .admonition-title a.glossary-term:hover {
  color: inherit !important;
  border-bottom-color: var(--moveris-green);
  border-bottom-style: solid;
}

/* Explicit hover for model-detail row-label */
.md-typeset table.model-detail tbody td.row-label a.glossary-term:hover {
  color: var(--moveris-green) !important;
}

/* --------------------------------------------------------------------------
   Back to top button - pill-shaped floating, icon + text, 20px margin, hidden when at top
   -------------------------------------------------------------------------- */
.md-top {
  position: fixed !important;
  bottom: 3.5rem !important;
  right: 20px !important;
  top: auto !important;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  min-width: 7rem !important;
  height: auto !important;
  padding: 0.5rem 1rem !important;
  border-radius: 2rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.md-top .md-icon {
  width: 1rem !important;
  height: 1rem !important;
  flex-shrink: 0 !important;
}

.md-top .md-top__label {
  white-space: nowrap !important;
}

.md-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

