/* =========================================================
   SAHARIYAR DOCUMENTATION SYSTEM
   ========================================================= */


/* ---------------------------------------------------------
   Variables
   --------------------------------------------------------- */

:root {

    --docs-sidebar: 260px;

    --docs-content: 780px;

    --docs-toc: 220px;

    --docs-code-bg: #0d1117;

    --docs-code-border: #30363d;

}


/* ---------------------------------------------------------
   Global docs
   --------------------------------------------------------- */

.docs-shell {

    width: 100%;

    max-width: 1600px;

    margin: auto;

}


/* ---------------------------------------------------------
   Reading progress
   --------------------------------------------------------- */

.docs-progress {

    position: fixed;

    top: 0;

    left: 0;

    height: 3px;

    width: 0;

    background: var(--accent);

    z-index: 999;

}


/* ---------------------------------------------------------
   Documentation top bar
   --------------------------------------------------------- */

.docs-topbar {

    position: sticky;

    top: 72px;

    z-index: 40;

    height: 58px;

    border-bottom: 1px solid var(--border);

    background:
        color-mix(
            in srgb,
            var(--bg) 90%,
            transparent
        );

    backdrop-filter: blur(18px);

}


.docs-topbar-inner {

    max-width: 1600px;

    height: 100%;

    margin: auto;

    padding: 0 28px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

}


.docs-breadcrumb {

    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;

    color: var(--muted);

    font-size: .78rem;

}


.docs-breadcrumb strong {

    color: var(--text);

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.docs-search {

    position: relative;

    width: 330px;

}


.docs-search span {

    position: absolute;

    left: 12px;

    top: 7px;

    color: var(--muted);

}


.docs-search input {

    width: 100%;

    height: 36px;

    padding: 0 60px 0 35px;

    border-radius: 9px;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    outline: none;

    font-size: .78rem;

}


.docs-search input:focus {

    border-color: var(--accent);

}


.docs-search kbd {

    position: absolute;

    right: 8px;

    top: 7px;

    padding: 2px 5px;

    border: 1px solid var(--border);

    border-radius: 5px;

    color: var(--muted);

    font-size: .62rem;

}


/* ---------------------------------------------------------
   Main layout
   --------------------------------------------------------- */

.docs-layout {

    display: grid;

    grid-template-columns:
        var(--docs-sidebar)
        minmax(0, var(--docs-content))
        var(--docs-toc);

    gap: 42px;

    align-items: start;

    padding: 42px 28px 100px;

}


/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */

.docs-sidebar {

    position: sticky;

    top: 145px;

    max-height:
        calc(100vh - 165px);

    overflow-y: auto;

    padding-right: 12px;

}


.docs-sidebar::-webkit-scrollbar {

    width: 5px;

}


.docs-sidebar::-webkit-scrollbar-thumb {

    background: var(--border);

    border-radius: 20px;

}


.docs-side-title {

    margin: 0 0 10px;

    text-transform: uppercase;

    letter-spacing: .13em;

    color: var(--muted);

    font-size: .64rem;

    font-weight: 850;

}


.docs-nav-group {

    margin-bottom: 25px;

}


.docs-nav-group details summary {

    cursor: pointer;

    list-style: none;

}


.docs-nav-group details summary::-webkit-details-marker {

    display: none;

}


.docs-nav-group a {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    padding: 7px 10px;

    margin: 2px 0;

    border-radius: 8px;

    color: var(--muted);

    font-size: .82rem;

    transition: .18s ease;

}


.docs-nav-group a:hover {

    color: var(--text);

    background: var(--surface2);

}


.docs-nav-group a.active {

    color: var(--accent);

    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            var(--surface)
        );

    font-weight: 750;

}


.docs-nav-group .sub {

    padding-left: 24px;

    font-size: .76rem;

}


/* ---------------------------------------------------------
   Mobile sidebar button
   --------------------------------------------------------- */

.docs-mobile-bar {

    display: none;

    gap: 8px;

    margin-bottom: 20px;

}


.docs-mobile-bar button {

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    border-radius: 9px;

    padding: 8px 12px;

    cursor: pointer;

}


/* ---------------------------------------------------------
   Article
   --------------------------------------------------------- */

.docs-article {

    min-width: 0;

}


.docs-article-header {

    padding-bottom: 32px;

    margin-bottom: 35px;

    border-bottom: 1px solid var(--border);

}


.docs-article h1 {

    margin: 8px 0 15px;

    font-size:
        clamp(2.5rem, 5vw, 4.3rem);

    line-height: 1.04;

    letter-spacing: -.06em;

}


.docs-lead {

    max-width: 720px;

    margin: 0;

    color: var(--muted);

    font-size: 1.08rem;

}


.docs-meta {

    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 18px;

}


.docs-meta span {

    padding: 4px 8px;

    border: 1px solid var(--border);

    border-radius: 6px;

    color: var(--muted);

    font-size: .67rem;

}


/* ---------------------------------------------------------
   Article content
   --------------------------------------------------------- */

.docs-content {

    font-size: .96rem;

}


.docs-content h2 {

    position: relative;

    margin: 55px 0 17px;

    scroll-margin-top: 140px;

    font-size: 1.7rem;

    letter-spacing: -.035em;

}


.docs-content h3 {

    margin: 36px 0 12px;

    scroll-margin-top: 140px;

    font-size: 1.18rem;

}


.docs-content h2:hover::before,

.docs-content h3:hover::before {

    content: "#";

    position: absolute;

    left: -25px;

    color: var(--accent);

    font-size: .9em;

}


.docs-content p {

    margin: 0 0 18px;

    color: var(--muted);

}


.docs-content ul,

.docs-content ol {

    padding-left: 24px;

    color: var(--muted);

}


.docs-content li {

    margin: 7px 0;

}


.docs-content strong {

    color: var(--text);

}


.docs-content blockquote {

    margin: 22px 0;

    padding: 14px 18px;

    border-left: 3px solid var(--accent);

    background: var(--surface2);

    border-radius: 0 9px 9px 0;

    color: var(--muted);

}


/* ---------------------------------------------------------
   Inline code
   --------------------------------------------------------- */

.docs-content code:not(pre code) {

    padding: 2px 5px;

    border-radius: 5px;

    border: 1px solid var(--border);

    background: var(--surface2);

    color: var(--text);

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size: .82em;

}


/* ---------------------------------------------------------
   Code blocks
   --------------------------------------------------------- */

.code-wrap {

    overflow: hidden;

    margin: 23px 0;

    border: 1px solid var(--docs-code-border);

    border-radius: 12px;

    background: var(--docs-code-bg);

}


.code-head {

    height: 39px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 12px;

    border-bottom: 1px solid var(--docs-code-border);

    background: #161b22;

    color: #8b949e;

    font-size: .68rem;

}


.code-head button {

    border: 1px solid #30363d;

    border-radius: 6px;

    background: transparent;

    color: #c9d1d9;

    padding: 4px 8px;

    cursor: pointer;

}


.code-head button:hover {

    background: #21262d;

}


.code-wrap pre {

    margin: 0;

    padding: 18px;

    overflow-x: auto;

    color: #e6edf3;

    font:
        13px/1.7
        "SFMono-Regular",
        Consolas,
        monospace;

}


/* ---------------------------------------------------------
   Callouts
   --------------------------------------------------------- */

.docs-note {

    margin: 22px 0;

    padding: 15px 17px;

    border: 1px solid var(--border);

    border-left: 4px solid var(--accent);

    border-radius: 10px;

    background: var(--surface);

}


.docs-note b {

    display: block;

    margin-bottom: 4px;

    font-size: .82rem;

}


.docs-note p {

    margin: 0;

    font-size: .86rem;

}


.docs-note.tip {

    border-left-color: #22c55e;

}


.docs-note.warning {

    border-left-color: #f59e0b;

}


.docs-note.danger {

    border-left-color: #ef4444;

}


/* ---------------------------------------------------------
   Table
   --------------------------------------------------------- */

.docs-table-wrap {

    overflow-x: auto;

    margin: 22px 0;

    border: 1px solid var(--border);

    border-radius: 10px;

}


.docs-table {

    width: 100%;

    min-width: 520px;

    border-collapse: collapse;

    font-size: .82rem;

}


.docs-table th,

.docs-table td {

    padding: 11px 13px;

    border-bottom: 1px solid var(--border);

    text-align: left;

}


.docs-table th {

    background: var(--surface2);

    font-weight: 800;

}


.docs-table tr:last-child td {

    border-bottom: 0;

}


/* ---------------------------------------------------------
   Right TOC
   --------------------------------------------------------- */

.docs-toc {

    position: sticky;

    top: 145px;

    max-height:
        calc(100vh - 165px);

    overflow-y: auto;

    padding-left: 18px;

    border-left: 1px solid var(--border);

}


.docs-toc-title {

    margin-bottom: 9px;

    color: var(--muted);

    text-transform: uppercase;

    letter-spacing: .12em;

    font-size: .65rem;

    font-weight: 850;

}


.docs-toc a {

    display: block;

    padding: 5px 0;

    color: var(--muted);

    font-size: .73rem;

}


.docs-toc a:hover,

.docs-toc a.active {

    color: var(--accent);

}


.docs-toc a.sub {

    padding-left: 12px;

    font-size: .69rem;

}


/* ---------------------------------------------------------
   Previous / next
   --------------------------------------------------------- */

.docs-pagination {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-top: 70px;

    padding-top: 25px;

    border-top: 1px solid var(--border);

}


.docs-page-link {

    padding: 14px 16px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--surface);

    transition: .18s ease;

}


.docs-page-link:hover {

    transform: translateY(-2px);

    box-shadow: var(--shadow);

}


.docs-page-link.next {

    text-align: right;

}


.docs-page-link small {

    display: block;

    margin-bottom: 3px;

    color: var(--muted);

    font-size: .66rem;

}


.docs-page-link b {

    font-size: .84rem;

}


/* ---------------------------------------------------------
   Edit / updated
   --------------------------------------------------------- */

.docs-edit {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-top: 28px;

    color: var(--muted);

    font-size: .71rem;

}


/* ---------------------------------------------------------
   Docs homepage
   --------------------------------------------------------- */

.docs-home {

    padding-top: 85px;

    padding-bottom: 110px;

}


.docs-home-hero {

    max-width: 760px;

    margin-bottom: 80px;

}


.docs-home h1 {

    margin: 0 0 18px;

    font-size:
        clamp(3rem, 7vw, 5.5rem);

    line-height: 1;

    letter-spacing: -.065em;

}


.docs-home-lead {

    max-width: 700px;

    color: var(--muted);

    font-size: 1.1rem;

}


.docs-home-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 27px;

}


.docs-primary-btn,

.docs-secondary-btn {

    padding: 11px 16px;

    border-radius: 11px;

    font-weight: 750;

    font-size: .86rem;

}


.docs-primary-btn {

    background: var(--text);

    color: var(--bg);

}


.docs-secondary-btn {

    border: 1px solid var(--border);

    background: var(--surface);

}


.docs-section-heading {

    display: flex;

    align-items: end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;

}


.docs-section-heading h2 {

    margin: 0;

    font-size: 2rem;

    letter-spacing: -.04em;

}


.docs-home-search {

    position: relative;

    width: 330px;

}


.docs-home-search span {

    position: absolute;

    left: 12px;

    top: 8px;

    color: var(--muted);

}


.docs-home-search input {

    width: 100%;

    height: 38px;

    padding: 0 55px 0 34px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--surface);

    color: var(--text);

    outline: none;

}


.docs-home-search kbd {

    position: absolute;

    right: 8px;

    top: 8px;

    padding: 2px 5px;

    border: 1px solid var(--border);

    border-radius: 5px;

    color: var(--muted);

    font-size: .62rem;

}


.docs-doc-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 17px;

}


.docs-doc-card {

    display: grid;

    grid-template-columns: 48px 1fr;

    gap: 18px;

    padding: 23px;

    border: 1px solid var(--border);

    border-radius: 17px;

    background: var(--surface);

    transition: .22s ease;

}


.docs-doc-card:hover {

    transform: translateY(-3px);

    box-shadow: var(--shadow);

}


.docs-doc-icon {

    width: 43px;

    height: 43px;

    display: grid;

    place-items: center;

    border-radius: 11px;

    background: var(--surface2);

    color: var(--accent);

    font-weight: 900;

}


.docs-card-top {

    display: flex;

    justify-content: space-between;

    gap: 10px;

    color: var(--muted);

    font-size: .66rem;

}


.docs-card-top span:first-child {

    color: var(--accent);

    font-weight: 800;

}


.docs-card-content h3 {

    margin: 8px 0 6px;

    font-size: 1.18rem;

}


.docs-card-content p {

    margin: 0;

    color: var(--muted);

    font-size: .84rem;

}


.docs-card-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: 18px;

    color: var(--muted);

    font-size: .68rem;

}


.docs-card-footer strong {

    color: var(--accent);

}


.docs-empty,

.docs-error {

    padding: 50px;

    border: 1px dashed var(--border);

    border-radius: 15px;

    text-align: center;

    color: var(--muted);

}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1150px) {

    .docs-layout {

        grid-template-columns:
            235px
            minmax(0, 1fr);

        gap: 30px;

    }


    .docs-toc {

        display: none;

    }

}


@media (max-width: 760px) {

    .docs-topbar {

        top: 72px;

    }


    .docs-topbar-inner {

        padding: 0 14px;

    }


    .docs-breadcrumb {

        max-width: 45%;

    }


    .docs-search {

        width: 50%;

    }


    .docs-layout {

        display: block;

        padding: 20px 14px 75px;

    }


    .docs-sidebar {

        display: none;

        position: fixed;

        z-index: 80;

        top: 135px;

        left: 14px;

        right: 14px;

        max-height: 70vh;

        padding: 16px;

        border: 1px solid var(--border);

        border-radius: 14px;

        background: var(--surface);

        box-shadow: var(--shadow);

    }


    .docs-sidebar.open {

        display: block;

    }


    .docs-mobile-bar {

        display: flex;

    }


    .docs-section-heading {

        display: block;

    }


    .docs-home-search {

        width: 100%;

        margin-top: 18px;

    }


    .docs-doc-grid {

        grid-template-columns: 1fr;

    }


    .docs-pagination {

        grid-template-columns: 1fr;

    }


    .docs-page-link.next {

        text-align: left;

    }


    .docs-edit {

        flex-direction: column;

        align-items: flex-start;

    }

}


@media (max-width: 500px) {

    .docs-home {

        padding-top: 60px;

    }


    .docs-home h1 {

        font-size: 3.25rem;

    }


    .docs-search input {

        font-size: .72rem;

    }


    .docs-search kbd {

        display: none;

    }

}