/* ============================
   GitBook/Laravel-style Docs UI
   ============================ */

:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --soft: #f8fafc;
    --border: #e2e8f0;

    --primary: #6d28d9; /* adjust to your brand */
    --primary-2: #7c3aed;

    --radius: 14px;
    --shadow: 0 8px 30px rgba(2, 6, 23, 0.06);

    --sidebar-w: 290px;
    --toc-w: 260px;
    --topbar-h: 64px;

    --font:
        ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
        "Noto Sans", "Liberation Sans", sans-serif;
    --mono:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 800;
}
.brand__text small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.pill {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    background: var(--soft);
}

/* Search */
.search {
    position: relative;
    width: min(620px, 56vw);
}
.search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 110px 12px 44px;
    outline: none;
    background: #fff;
    box-shadow: 0 1px 0 rgba(2, 6, 23, 0.03);
}
.search input:focus {
    border-color: rgba(109, 40, 217, 0.35);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.12);
}
.search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--muted);
}
.kbd,
.kbdInline {
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 7px;
    background: var(--soft);
    color: var(--muted);
}
.kbdInline {
    margin: 0 4px;
}
.kbdPlus {
    color: var(--muted);
    margin: 0 6px;
    font-size: 12px;
}
.search .kbd,
.search .kbdPlus {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.search .kbd:nth-of-type(1) {
    right: 70px;
}
.search .kbdPlus {
    right: 58px;
}
.search .kbd:nth-of-type(2) {
    right: 28px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.btn--ghost {
    background: transparent;
}
.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
}
.btn--block {
    width: 100%;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
    min-height: calc(100vh - var(--topbar-h));
}

.sidebar {
    border-right: 1px solid var(--border);
    padding: 18px;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: auto;
    background: #fff;
}
.sidebar__title {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 14px 0 8px;
}
.sidebar__section {
    margin-bottom: 10px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nav__link {
    padding: 10px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
}
.nav__link:hover {
    background: var(--soft);
    border-color: var(--border);
}
.nav__link.is-active {
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.22);
    color: #2e1065;
}

.sidebar__footer {
    margin-top: 18px;
}
.supportCard {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--soft);
}
.supportCard__title {
    font-weight: 800;
    margin-bottom: 6px;
}
.supportCard__text {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

/* Documentation screenshots */
.doc-figure {
    margin: 22px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.doc-figure__image {
    display: block;
    width: 100%;
    height: auto;
    background: var(--soft);
    border-bottom: 1px solid var(--border);
}
.doc-figure__caption {
    padding: 12px 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}
.doc-figure__caption strong {
    color: var(--text);
}
.doc-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}
.doc-gallery .doc-figure {
    margin: 0;
}
@media (max-width: 860px) {
    .doc-gallery {
        grid-template-columns: 1fr;
    }
}

/* Main */
.main {
    padding: 24px 22px 40px;
    background: #fff;
}
.content {
    max-width: 920px;
    margin: 0 auto;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 32px;
    margin: 10px 0 8px;
    letter-spacing: -0.02em;
}
.lead {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 18px;
}

h2 {
    margin-top: 26px;
    padding-top: 10px;
    font-size: 22px;
    letter-spacing: -0.01em;
}
h3 {
    margin-top: 18px;
    font-size: 18px;
}
p {
    line-height: 1.8;
    color: var(--text);
}
a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
}
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}
.card__title {
    font-weight: 800;
    margin-bottom: 10px;
}

.doc-table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 18px 0;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.doc-table th,
.doc-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.doc-table th {
    background: var(--soft);
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.doc-table tr:last-child td {
    border-bottom: 0;
}

.doc-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
}

.doc-badge--stable {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.24);
    color: #15803d;
}

.doc-badge--advanced {
    background: rgba(109, 40, 217, 0.1);
    border-color: rgba(109, 40, 217, 0.24);
    color: #5b21b6;
}

.list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}
.steps {
    margin: 0;
    padding-left: 18px;
}
.steps li {
    margin: 8px 0;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0;
}

/* Callouts */
.callout {
    border-radius: var(--radius);
    padding: 14px 14px;
    border: 1px solid var(--border);
    margin: 12px 0;
    background: var(--soft);
}
.callout--note {
    border-left: 5px solid #3b82f6;
}
.callout--tip {
    border-left: 5px solid #22c55e;
}
.callout--warn {
    border-left: 5px solid #f59e0b;
}

/* Code blocks */
/* =========================
   Inline code vs code blocks
   ========================= */

/* Inline code (default) */
:not(pre) > code {
    font-family: var(--mono);
    font-size: 0.92em;
    color: var(--text); /* dark readable text */
    background: var(--soft); /* light chip */
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Code blocks */
pre {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: #0b1220;
    overflow: auto;
    box-shadow: var(--shadow);
}

/* Code inside pre should be light */
pre code {
    font-family: var(--mono);
    font-size: 13px;
    color: #e5e7eb;
    background: transparent;
    border: 0;
    padding: 0;
    white-space: pre; /* keep formatting */
}

/* IMPORTANT: remove/override the old global rule if it exists */
code {
    font-family: var(--mono);
}
.copyBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}
.copyBtn:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Pager */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}
.pager__next,
.pager__prev {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

/* TOC */
.toc {
    border-left: 1px solid var(--border);
    padding: 18px;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: auto;
    background: #fff;
}
.toc__title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 10px;
}
.toc__list a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
}
.toc__list a:hover {
    background: var(--soft);
    border-color: var(--border);
    color: var(--text);
}
.toc__list a.is-active {
    color: #2e1065;
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.22);
}

/* Responsive */
@media (max-width: 1100px) {
    :root {
        --toc-w: 0px;
    }
    .layout {
        grid-template-columns: var(--sidebar-w) 1fr;
    }
    .toc {
        display: none;
    }
}
@media (max-width: 860px) {
    :root {
        --sidebar-w: 0px;
    }
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .grid2 {
        grid-template-columns: 1fr;
    }
    .search {
        width: min(92vw, 620px);
    }
}

/* Print */
@media print {
    .topbar,
    .sidebar,
    .toc,
    .pager,
    .copyBtn {
        display: none !important;
    }
    .main {
        padding: 0;
    }
    pre {
        background: #fff;
        color: #000;
    }
    code {
        color: #000;
    }
}
.muted {
    color: var(--muted);
}
.list li {
    margin: 8px 0;
    line-height: 1.7;
}

.media--window {
    max-width: 450px; /* Half size */
    margin: 30px auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.media--window img {
    width: 75%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: block;
}

.media--window figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* ========================= */
/* Installation Step Panel   */
/* ========================= */

.doc-steps {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.doc-steps__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #111827;
}

.doc-steps__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-steps__list li {
    margin-bottom: 10px;
}

.doc-steps__list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    transition: 0.2s ease;
}

.doc-steps__list a:hover {
    background: #f3f4f6;
    color: #111827;
}

.doc-steps__list span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    margin-right: 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
}
.doc-heading {
    font-size: 26px;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 14px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}
.media {
    max-width: 720px;
    margin: 24px auto;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}

.media img,
.media video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.media figcaption,
.media__caption {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}
.callout {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
}

.callout--note {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.callout--warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.callout--tip {
    border-left-color: #6366f1;
    background: #eef2ff;
}
.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin: 20px 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}
