/* SceneView docs — custom styles */

:root {
  --md-primary-fg-color: #6c35aa;
  --md-primary-fg-color--light: #9c65da;
  --md-primary-fg-color--dark: #4a1d8a;
  --md-accent-fg-color: #9c27b0;
}

/* Force all inline emoji/icons to monochrome tinted with theme color */
.md-typeset .twemoji svg,
.md-typeset .gemoji img,
.md-typeset .emojione svg,
.md-content .twemoji svg {
  fill: currentColor;
  filter: none;
}

/* Grid card icons — tinted with theme primary */
.grid.cards .twemoji svg {
  fill: var(--md-primary-fg-color);
  width: 2rem;
  height: 2rem;
}

/* Buttons — icon inherits button text color */
.md-button .twemoji svg {
  fill: currentColor;
}

/* Hero tagline on homepage */
.hero-tagline {
  font-size: 1.25rem;
  color: var(--md-default-fg-color--light);
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

/* Footer note */
.footer-note {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--lighter);
  text-align: center;
  margin-top: 2rem;
}

/* Step numbers for codelab-style headers */
.md-content h2 {
  counter-increment: step;
}

/* Only show step counters on codelab pages */
.md-content[data-page="codelabs"] h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.md-content[data-page="codelabs"] h2::before {
  content: counter(step);
  background: var(--md-primary-fg-color);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.md-content {
  counter-reset: step;
}

/* Code blocks */
.highlight code {
  font-size: 0.85rem;
}

/* Card grid */
.grid.cards > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.grid.cards > ul > li {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.grid.cards > ul > li:hover {
  box-shadow: 0 4px 16px rgba(108, 53, 170, 0.15);
}

/* Hero image centering */
.md-content img[width] {
  display: block;
  margin: 0 auto 2rem;
}

/* Feature matrix — highlight SceneView column */
table th:nth-child(2),
table td:nth-child(2) {
  font-weight: 500;
}

/* Admonition question style for FAQ */
.md-typeset .admonition.question {
  border-color: var(--md-primary-fg-color);
}

/* Cheatsheet — compact tables */
.md-typeset table:not([class]) {
  font-size: 0.88rem;
}

/* Mobile: full-width code blocks */
@media screen and (max-width: 76.1875em) {
  .md-content .highlight pre {
    margin-left: -0.8rem;
    margin-right: -0.8rem;
    border-radius: 0;
  }

  /* Stack grid cards on small screens */
  .grid.cards > ul {
    grid-template-columns: 1fr;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better inline code readability */
.md-typeset code:not(.highlight code) {
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Navigation tab active indicator */
.md-tabs__link--active {
  border-bottom: 2px solid var(--md-accent-fg-color);
}
