/* ========================
   Silex Documentation Theme
   Inspired by www.silex.me
   ======================== */

/* Single header — tabs integrated, no separate bar */
.md-header {
  background: white;
  color: #333;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.md-header__topic {
  color: #333;
}

.md-header .md-icon,
.md-header .md-header__button {
  color: #555;
}

.md-tabs {
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.md-tabs__link {
  color: #555;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: #7c3aed;
}

/* "Open Silex" button in tabs */
.md-tabs__item--open-silex {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.md-tabs__link--open-silex {
  opacity: 1 !important;
  margin: auto;
}

.md-tabs__link--open-silex::before {
  content: "→ ";
}

/* Dark mode */
[data-md-color-scheme="slate"] .md-header {
  background: #1a1a2e;
  color: white;
  box-shadow: none;
}

[data-md-color-scheme="slate"] .md-header__topic,
[data-md-color-scheme="slate"] .md-header .md-icon,
[data-md-color-scheme="slate"] .md-header .md-header__button {
  color: white;
}

[data-md-color-scheme="slate"] .md-tabs {
  background: #1a1a2e;
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-md-color-scheme="slate"] .md-tabs__link {
  color: rgba(255, 255, 255, 0.7);
}

[data-md-color-scheme="slate"] .md-tabs__link--active,
[data-md-color-scheme="slate"] .md-tabs__link:hover {
  color: white;
}

/* Logo sizing */
.md-header__button.md-logo img {
  height: 1.8rem;
}

/* Hero image on homepage */
.md-content img[alt*="Silex visual editor"] {
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin: 1rem 0 2rem;
  max-width: 100%;
}

/* Screenshots in docs - subtle frame */
.md-content img[alt*="The "],
.md-content img[alt*="panel"],
.md-content img[alt*="dialog"],
.md-content img[alt*="Settings"],
.md-content img[alt*="selector"],
.md-content img[alt*="editor"],
.md-content img[alt*="dashboard"],
.md-content img[alt*="login"],
.md-content img[alt*="template"] {
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin: 1rem 0;
  max-width: 100%;
}

/* Dark mode screenshot frame */
[data-md-color-scheme="slate"] .md-content img[alt*="The "],
[data-md-color-scheme="slate"] .md-content img[alt*="panel"],
[data-md-color-scheme="slate"] .md-content img[alt*="dialog"],
[data-md-color-scheme="slate"] .md-content img[alt*="Settings"],
[data-md-color-scheme="slate"] .md-content img[alt*="selector"],
[data-md-color-scheme="slate"] .md-content img[alt*="editor"],
[data-md-color-scheme="slate"] .md-content img[alt*="dashboard"],
[data-md-color-scheme="slate"] .md-content img[alt*="login"],
[data-md-color-scheme="slate"] .md-content img[alt*="template"] {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Quiz answers - green accent */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: #4caf50;
}

/* Cards on homepage */
.md-typeset .grid.cards > ul > li {
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.md-typeset .grid.cards > ul > li:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Footer - matching silex.me */
.md-footer-meta {
  background: #f8f8fa;
  color: #555;
}

.md-footer-meta a {
  color: #333;
}

[data-md-color-scheme="slate"] .md-footer-meta {
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.7);
}

[data-md-color-scheme="slate"] .md-footer-meta a {
  color: white;
}

/* Accessibility - focus indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 2px;
}

/* Skip to content link - visible on focus */
.md-skip {
  background: #7c3aed;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* Ensure sufficient contrast in admonitions */
.md-typeset .admonition-title,
.md-typeset summary {
  font-weight: 600;
}

/* Responsive images */
.md-content img {
  max-width: 100%;
  height: auto;
}
