/* Rine brand overrides for Material for MkDocs
   Colors: teal accent (#00E0C8), amber signal (#FFB814), dark surfaces */

/* ── Palette ── */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0d0d0f;
  --md-primary-bg-color: #e8e8ed;
  --md-accent-fg-color: #FFB814;
  --md-default-bg-color: #0d0d0f;

  /* Teal accent throughout */
  --md-typeset-a-color: #33F5DD;
  --md-footer-bg-color: #0a0a0c;
  --md-footer-fg-color--lighter: #8e8e93;
}

/* ── Header ── */
.md-header {
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Hide the default Material icon — "rine" text replaces it */
.md-header .md-logo svg,
.md-header .md-logo img {
  display: none;
}

/* "rine" wordmark inside the logo <a> — IS the home link */
.md-header .md-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.md-header .md-logo::before {
  content: "rine";
  background: linear-gradient(135deg, #e8e8ed 0%, #00E0C8 32%, #FFB814 65%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

/* "docs" muted subtitle — matches dir.rine.network pattern */
.md-header .md-logo::after {
  content: "docs";
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #8e8e93;
}

/* Hide the duplicate site name from the header topic */
.md-header__topic:first-child .md-ellipsis {
  display: none;
}

/* ── Navigation ── */
.md-nav__link--active,
.md-nav__link:is(:focus, :hover) {
  color: #33F5DD;
}

.md-nav__item--active > .md-nav__link {
  color: #33F5DD;
}

/* ── Code blocks ── */
.md-typeset code {
  border-radius: 4px;
}

.md-typeset pre > code {
  border-radius: 8px;
}

/* Inline code: subtle teal tint */
[data-md-color-scheme="slate"] .md-typeset :not(pre) > code {
  background: rgba(0, 224, 200, 0.08);
  color: #33F5DD;
  border: 1px solid rgba(0, 224, 200, 0.1);
}

/* ── Admonitions — teal info, amber warning, red danger ── */
[data-md-color-scheme="slate"] .md-typeset .admonition.info,
[data-md-color-scheme="slate"] .md-typeset details.info {
  border-color: #00E0C8;
}

[data-md-color-scheme="slate"] .md-typeset .info > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .info > summary {
  background-color: rgba(0, 224, 200, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.warning,
[data-md-color-scheme="slate"] .md-typeset details.warning {
  border-color: #FFB814;
}

[data-md-color-scheme="slate"] .md-typeset .warning > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .warning > summary {
  background-color: rgba(255, 184, 20, 0.08);
}

/* ── Links ── */
[data-md-color-scheme="slate"] .md-typeset a {
  color: #33F5DD;
}

[data-md-color-scheme="slate"] .md-typeset a:hover {
  color: #00E0C8;
}

/* ── Search highlight ── */
.md-search-result mark {
  background: rgba(0, 224, 200, 0.25);
  color: inherit;
}

/* ── Tables — subtle borders ── */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: rgba(0, 224, 200, 0.06);
  color: #e8e8ed;
}

/* ── TOC (right sidebar) — amber for active item ── */
.md-nav__link[data-md-state="blur"],
.md-sidebar--secondary .md-nav__link--active {
  color: #FFB814;
}

/* ── Content tabs — amber active indicator ── */
.md-typeset .tabbed-set > input:checked + label {
  color: #FFB814;
  border-color: #FFB814;
}

.md-typeset .tabbed-labels > label:hover {
  color: #FFD04F;
}

/* ── Permalink anchors ── */
.md-typeset .headerlink {
  color: rgba(255, 184, 20, 0.4);
}

.md-typeset .headerlink:hover {
  color: #FFB814;
}

/* ── Header page title (second topic) ── */
.md-header__topic:last-child {
  color: #8e8e93;
}

/* ── Hero section (index page) ── */
.rine-hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.rine-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  color: #e8e8ed;
}

.rine-hero .wordmark {
  background: linear-gradient(135deg, #e8e8ed 0%, #00E0C8 35%, #FFB814 72%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rine-hero p {
  color: #8e8e93;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* ── Surface cards (matches on.rine.network / dir.rine.network) ── */
.rine-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}

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

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

.rine-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(28, 28, 30, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.rine-card:hover {
  border-color: rgba(0, 224, 200, 0.3);
  transform: translateY(-1px);
}

/* Concept card variant — rine gradient tinted background */
.rine-card--concept {
  background: linear-gradient(135deg, rgba(0, 224, 200, 0.08) 0%, rgba(255, 184, 20, 0.08) 100%);
  border-color: rgba(0, 224, 200, 0.15);
}

.rine-card--concept:hover {
  border-color: rgba(0, 224, 200, 0.35);
  background: linear-gradient(135deg, rgba(0, 224, 200, 0.12) 0%, rgba(255, 184, 20, 0.12) 100%);
}

/* Icon container */
.rine-card-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(0, 224, 200, 0.06);
  border: 1px solid rgba(0, 224, 200, 0.1);
}

.rine-card-icon--concept {
  background: rgba(255, 184, 20, 0.06);
  border-color: rgba(255, 184, 20, 0.1);
}

.rine-card-icon svg {
  width: 18px;
  height: 18px;
}

/* Card text */
.rine-card-body {
  flex: 1;
  min-width: 0;
}

.rine-card-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: #e8e8ed;
  margin: 0;
  line-height: 1.3;
}

.rine-card-desc {
  font-size: 0.78rem;
  color: #8e8e93;
  margin: 0.15rem 0 0;
  line-height: 1.4;
}

.rine-card-install {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.68rem;
  color: #33F5DD;
  background: rgba(0, 224, 200, 0.08);
  border: 1px solid rgba(0, 224, 200, 0.1);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

/* Section divider */
.rine-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8e8e93;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Agent-facing section */
.rine-agent-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: rgba(28, 28, 30, 0.4);
  border: 1px solid rgba(255, 184, 20, 0.1);
  margin: 1rem 0 2rem;
  flex-wrap: wrap;
}

.rine-agent-bar code {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.78rem;
  color: #FFB814;
  background: rgba(255, 184, 20, 0.08);
  border: 1px solid rgba(255, 184, 20, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  text-decoration: none;
}

.rine-agent-bar a {
  text-decoration: none;
}

.rine-agent-bar span {
  font-size: 0.82rem;
  color: #8e8e93;
}

/* ── Scrollbar (webkit) — subtle teal ── */
::-webkit-scrollbar-thumb {
  background: rgba(0, 224, 200, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 224, 200, 0.3);
}
