/* ==========================================================================
   Superium — documentation (help/)
   --------------------------------------------------------------------------
   Its own small stylesheet, in the shape of the Novira docs sheet the rest of
   this library uses. Prefix `docs-` keeps it clear of the template's `sp-`
   styles: deleting help/ never touches the theme.

   The font is the one bundled with the package — no CDN, exactly like the
   template itself.
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../../assets/fonts/Vazirmatn/Vazirmatn[wght].woff2')
    format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --docs-brand: #f2600c;
  --docs-brand-soft: #fff1e7;
  --docs-text: #241a12;
  --docs-muted: #7a7168;
  --docs-border: #e8e2db;
  --docs-bg: #f7f4f0;
  --docs-sidebar: #fff;
  --docs-code-bg: #1a1f27;
  --docs-code-text: #e8ecf2;
  --docs-note: #eef7f0;
  --docs-note-line: #16a34a;
  --docs-warn: #fff6e6;
  --docs-warn-line: #f59e0b;
  --docs-radius: 12px;
  --docs-shadow: 0 8px 30px rgba(36, 26, 18, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.docs-page {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--docs-bg);
  color: var(--docs-text);
  line-height: 1.85;
}

/* Top bar ----------------------------------------------------------------- */

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--docs-border);
  box-shadow: 0 2px 12px rgba(36, 26, 18, 0.05);
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  margin-left: auto;
}

.docs-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--docs-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.docs-topbar-link {
  color: var(--docs-brand);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.docs-topbar-link:hover {
  text-decoration: underline;
}

/* Layout ------------------------------------------------------------------ */

.docs-layout {
  display: grid;
  grid-template-columns: 288px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 58px);
}

.docs-sidebar {
  background: var(--docs-sidebar);
  border-left: 1px solid var(--docs-border);
  padding: 1.25rem 1rem 2rem;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}

.docs-sidebar-title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--docs-muted);
  font-weight: 600;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.docs-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--docs-text);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.15s;
}

.docs-nav-link:hover {
  background: var(--docs-bg);
}

.docs-nav-link.is-active {
  background: var(--docs-brand-soft);
  color: var(--docs-brand);
  font-weight: 600;
}

.docs-main {
  padding: 1.5rem 1.75rem 2.5rem;
  min-width: 0;
}

/* Article ----------------------------------------------------------------- */

.docs-content {
  background: #fff;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius);
  box-shadow: var(--docs-shadow);
  padding: 2rem 2.25rem;
  max-width: 900px;
}

.docs-content h1 {
  margin: 0 0 1rem;
  font-size: 1.85rem;
  line-height: 1.45;
}

.docs-content h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--docs-brand-soft);
}

.docs-content h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.docs-content p {
  margin: 0.65rem 0;
}

.docs-content ul,
.docs-content ol {
  margin: 0.5rem 0 1rem;
  padding-right: 1.35rem;
}

.docs-content li {
  margin: 0.35rem 0;
}

.docs-content a {
  color: var(--docs-brand);
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

.docs-content strong {
  font-weight: 700;
}

/* Code is always LTR, whatever the paragraph around it does. */
.docs-content code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.88em;
  background: #f4f1ed;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  direction: ltr;
  unicode-bidi: embed;
}

.docs-content pre {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: var(--docs-code-bg);
  color: var(--docs-code-text);
  border-radius: 10px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
  line-height: 1.65;
}

/* Blockquotes carry the notes and warnings. */
.docs-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--docs-note);
  border-inline-start: 4px solid var(--docs-note-line);
  border-radius: 8px;
}

.docs-content blockquote.is-warn {
  background: var(--docs-warn);
  border-inline-start-color: var(--docs-warn-line);
}

.docs-content blockquote p:first-child {
  margin-top: 0;
}

.docs-content blockquote p:last-child {
  margin-bottom: 0;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.docs-table th,
.docs-table td {
  border: 1px solid var(--docs-border);
  padding: 0.6rem 0.75rem;
  text-align: right;
  vertical-align: top;
}

.docs-table th {
  background: var(--docs-brand-soft);
  font-weight: 600;
}

.docs-table tr:nth-child(even) td {
  background: #fbf9f7;
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--docs-border);
  margin: 1.75rem 0;
}

.docs-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  color: var(--docs-muted);
  font-size: 0.88rem;
}

.docs-footer a {
  color: var(--docs-brand);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-bottom: 1px solid var(--docs-border);
  }

  .docs-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
  }

  .docs-content {
    padding: 1.25rem 1rem;
  }

  .docs-main {
    padding: 1rem;
  }
}

@media (max-width: 520px) {
  /* The nav stays two columns even on a phone: fourteen full-width links
     would push the article a whole screen down. */
  .docs-nav-link {
    padding: 0.45rem 0.5rem;
    font-size: 0.84rem;
  }

  .docs-topbar {
    flex-wrap: wrap;
  }
}
