﻿.devdocs {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 240px;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
    margin-bottom: 48px;
}

/* =========================
   Sidebar + TOC Sticky
   ========================= */
.devdocs-sidebar,
.devdocs-toc {
    position: sticky;
    top: 90px;
}

/* =========================
   Sidebar
   ========================= */
.devdocs-sidebar-box {
    background: #f6f7fa;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0 16px;
}

.devdocs-sidebar-box--cats {
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.devdocs-sidebar-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

    .devdocs-sidebar-body::-webkit-scrollbar {
        width: 8px;
    }

    .devdocs-sidebar-body::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 999px;
    }

    .devdocs-sidebar-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.22);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: background 0.25s ease, border-color 0.25s ease;
    }

        .devdocs-sidebar-body::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.34);
            border-color: rgba(255, 255, 255, 0.28);
        }

    .devdocs-sidebar-body::-webkit-scrollbar-corner {
        background: transparent;
    }

/* =========================
   TOC
   ========================= */
.devdocs-toc-box {
    background: #f6f7fa;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0 16px;
}

.devdocs-toc-box--nav {
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.devdocs-toc-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

    .devdocs-toc-body::-webkit-scrollbar {
        width: 8px;
    }

    .devdocs-toc-body::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 999px;
    }

    .devdocs-toc-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.22);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: background 0.25s ease, border-color 0.25s ease;
    }

        .devdocs-toc-body::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.34);
            border-color: rgba(255, 255, 255, 0.28);
        }

    .devdocs-toc-body::-webkit-scrollbar-corner {
        background: transparent;
    }

/* =========================
   Shared Panel Titles
   ========================= */
.devdocs-sidebar-title,
.devdocs-toc-title {
    color: #0f172a;
}

.devdocs-sidebar-box--cats .devdocs-toc-title,
.devdocs-sidebar-box--cats .devdocs-sidebar-title,
.devdocs-toc-box--nav .devdocs-toc-title {
    font-weight: 700;
    margin-bottom: 0;
    padding: 20px 0;
    border-bottom: 1px solid #E5E7EB;
    background-color: #f6f7fa;
    flex: 0 0 auto;
    z-index: 2;
}

.devdocs-sidebar-todo {
    font-size: 13px;
    line-height: 1.8;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
}

.devdocs-main {
    min-width: 0;
}

.devdocs-header {
    background: rgba(246, 247, 250, 1);
    border: 1px solid rgba(229, 231, 235, 1);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: none;
    position: static;
    top: auto;
    z-index: auto;
}

.devdocs-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.devdocs-title {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 900;
    color: #0f172a;
}

.devdocs-subtitle {
    font-size: 14px;
    color: #64748b;
}

.devdocs-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.badge-kind {
    background: #eef2ff;
    color: #4338ca;
}

.badge-version {
    background: #f1f5f9;
    color: #334155;
}

.badge-latest {
    background: #dcfce7;
    color: #166534;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.badge-soft {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-active-soft {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-inactive-soft {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.devdocs-blog-ref {
    margin-top: 14px;
    font-size: 13px;
    color: #64748b;
}

.docs-empty-state,
.docs-empty-inner {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    color: #64748b;
}

.devdocs-section,
.endpoint {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 0 7px 0 #E0E0E0;
    scroll-margin-top: 110px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.section-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.devdocs-text {
    color: #334155;
    line-height: 2;
    font-size: 15px;
}

    .devdocs-text img {
        max-width: 100%;
        height: auto;
        border-radius: 12px;
    }

    .devdocs-text pre,
    .code-block {
        white-space: pre-wrap;
        word-break: break-word;
    }

.docs-attachments {
    margin-top: 24px;
}

.docs-block,
.docs-attachments {
    margin-top: 24px;
}

.docs-block-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
}

.docs-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: all .2s ease;
}

    .docs-attachment-item:hover {
        border-color: #cbd5e1;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
        transform: translateY(-1px);
    }

.docs-attachment-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
}

.docs-attachment-content {
    flex: 1;
    min-width: 0;
}

.docs-attachment-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    word-break: break-word;
}

.docs-attachment-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6b7280;
}

.docs-attachment-action {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
}

.section-endpoint-link {
    margin-top: 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
}

.endpoint-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.endpoint-header-main {
    min-width: 0;
}

.endpoint-route-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.method-badge,
.toc-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.method-get {
    background: #dcfce7;
    color: #166534;
}

.method-post {
    background: #dbeafe;
    color: #1d4ed8;
}

.method-put {
    background: #fef3c7;
    color: #92400e;
}

.method-delete {
    background: #fee2e2;
    color: #b91c1c;
}

.method-patch {
    background: #ede9fe;
    color: #6d28d9;
}

.method-default {
    background: #e5e7eb;
    color: #374151;
}

.endpoint-path {
    display: inline-block;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    direction: ltr;
}

.endpoint-header-text {
    min-width: 0;
}

.endpoint-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.endpoint-name {
    font-size: 13px;
    color: #64748b;
}

.endpoint-toggle {
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #334155;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s ease;
}

    .endpoint-toggle:hover {
        background: #f8fafc;
    }

.endpoint-toggle-icon {
    transition: transform .2s ease;
}

.endpoint.is-collapsed .endpoint-toggle-icon {
    transform: rotate(-90deg);
}

.endpoint-body {
    display: block;
}

.endpoint.is-collapsed .endpoint-body {
    display: none;
}

.endpoint-top-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.endpoint-summary {
    margin: 0 0 12px;
    font-size: 15px;
    color: #0f172a;
    line-height: 1.9;
}

.endpoint-description {
    color: #475569;
    line-height: 1.9;
    font-size: 14px;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 16px;
}

    .param-table thead th {
        background: #f8fafc;
        color: #334155;
        font-size: 13px;
        font-weight: 800;
        padding: 14px;
        border-bottom: 1px solid #e5e7eb;
        text-align: center;
    }

    .param-table tbody td {
        padding: 14px;
        border-bottom: 1px solid #eef2f7;
        color: #334155;
        font-size: 13px;
        vertical-align: middle;
        text-align: center;
    }

    .param-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .param-table code {
        direction: ltr;
        unicode-bidi: bidi-override;
        background: #f8fafc;
        color: #0f172a;
        border-radius: 8px;
        padding: 4px 8px;
        font-size: 12px;
    }

.table-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
}

.table-badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.table-badge-muted {
    background: #e5e7eb;
    color: #4b5563;
}

.table-badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.responses-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.response-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fcfcfd;
    padding: 16px;
}

.response-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.response-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #111827;
    color: #fff;
}

.response-description {
    font-size: 14px;
    color: #334155;
}

.code-box {
    position: relative;
    margin-top: 12px;
}

.code-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}

.copy-btn {
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s ease;
}

    .copy-btn:hover {
        opacity: .92;
    }

.code-block {
    margin: 0;
    background: #0b1220;
    color: #dbeafe;
    border-radius: 16px;
    padding: 16px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.9;
    direction: ltr;
    text-align: left;
}

.code-tabs {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.tab-header {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    background: #f8fafc;
}

.tab-btn {
    border: 0;
    border-left: 1px solid #e5e7eb;
    background: transparent;
    color: #475569;
    padding: 14px 16px;
    min-width: 160px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    transition: all .2s ease;
}

    .tab-btn:first-child {
        border-left: 0;
    }

    .tab-btn:hover {
        background: #f1f5f9;
    }

    .tab-btn.active {
        background: #fff;
        color: #0f172a;
    }

.tab-language {
    font-size: 11px;
    font-weight: 900;
    color: #2563eb;
    text-transform: uppercase;
}

.tab-title {
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.tab-panels {
    padding: 16px;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }

.example-panel-head {
    margin-bottom: 14px;
}

.example-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #0f172a;
}

.example-lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
}

/* =========================
   Sidebar Categories (Reference Style)
   ========================= */
.devdocs-cats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.devdocs-cats__item {
    margin-top: 13px;
}

    .devdocs-cats__item:first-child {
        margin-top: 0;
    }

.devdocs-cats__toggle {
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: #4F4F4F;
}

    .devdocs-cats__toggle:hover {
        text-decoration: none;
        color: #2166AE;
    }

    .devdocs-cats__toggle.is-active {
        color: #2166AE;
    }

    .devdocs-cats__toggle i::before {
        display: inline-block;
        transform: rotate(0deg);
        transition: 0.3s all;
    }

    .devdocs-cats__toggle.collapsed i::before {
        transform: rotate(90deg);
    }

.devdocs-cats__collapse {
    transition: all 0.25s ease;
}

.devdocs-cats__links {
    list-style: none;
    margin: 10px 0 0 16px;
    padding: 0;
    color: #4F4F4F;
}

    .devdocs-cats__links li,
    .devdocs-cats__links a {
        font-size: 13px !important;
    }

    .devdocs-cats__links a {
        padding: 6px;
        display: inline-block;
        margin-bottom: 6px;
        text-decoration: none;
        color: #4F4F4F;
    }

        .devdocs-cats__links a:hover {
            color: #2166AE;
        }

    .devdocs-cats__links li.is-active {
        background-color: #2166AE;
        border-radius: 4px;
        margin-bottom: 6px;
    }

        .devdocs-cats__links li.is-active a {
            margin: 0;
            color: #fff !important;
        }

.devdocs-sidebar-empty {
    font-size: 13px;
    line-height: 1.8;
    color: #64748b;
    padding: 8px 0;
}

/* =========================
   TOC Styles (Sidebar-like)
   ========================= */
.devdocs-toc-subtitle {
    font-size: 12px;
    font-weight: 900;
    color: #64748b;
    margin-bottom: 10px;
}

.devdocs-toc-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 14px 0;
}

.devdocs-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .devdocs-toc-list li + li {
        margin-top: 8px;
    }

.devdocs-toc-link {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    padding: 8px;
    transition: all .2s ease;
    color: #475569;
}

    .devdocs-toc-link:hover {
        background: #eef2f7;
        color: #0f172a;
    }

.devdocs-toc-link--method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.toc-method-badge--small {
    min-width: 46px;
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1;
}

.toc-method-text,
.toc-link-title {
    min-width: 0;
    font-size: 13px;
    line-height: 1.8;
    font-weight: 700;
    color: inherit;
}

.devdocs-toc-list a:hover .toc-method-text,
.devdocs-toc-list a:hover .toc-link-title {
    color: #0f172a;
}

.toc-method-text {
    min-width: 0;
}

.sidebar-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

@media (max-width: 1199.98px) {
    .devdocs {
        grid-template-columns: 1fr;
    }

    .devdocs-sidebar,
    .devdocs-toc {
        position: static;
    }

    .devdocs-sidebar {
        order: 3;
    }

    .devdocs-main {
        order: 2;
    }

    .devdocs-toc {
        order: 1;
    }

    .devdocs-sidebar-box--cats,
    .devdocs-toc-box--nav {
        max-height: none;
        overflow: visible;
    }

    .devdocs-sidebar-body,
    .devdocs-toc-body {
        overflow: visible;
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .devdocs {
        gap: 16px;
    }

    .devdocs-header,
    .devdocs-section,
    .endpoint {
        border-radius: 16px;
        padding: 16px;
    }

    .devdocs-sidebar-box,
    .devdocs-toc-box {
        border-radius: 16px;
    }

    .devdocs-header-top,
    .endpoint-header {
        flex-direction: column;
        align-items: stretch;
    }

    .devdocs-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .endpoint-title {
        font-size: 18px;
    }

    .docs-attachment-item {
        align-items: flex-start;
    }

    .docs-attachment-action {
        display: none;
    }

    .tab-btn {
        min-width: 140px;
        padding: 12px;
    }

    .param-table,
    .param-table thead,
    .param-table tbody,
    .param-table tr,
    .param-table th,
    .param-table td {
        display: block;
        width: 100%;
    }

        .param-table thead {
            display: none;
        }

        .param-table tbody tr {
            border: 1px solid #e5e7eb;
            border-radius: 14px;
            padding: 10px;
            margin-bottom: 12px;
            background: #fff;
        }

        .param-table tbody td {
            border: 0;
            padding: 8px 0;
            text-align: right;
        }

            .param-table tbody td::before {
                content: attr(data-label) " : ";
                font-weight: 800;
                color: #475569;
            }
}

.docs-group-intro {
    margin-bottom: 16px;
    padding: 8px 4px 4px;
}

.docs-group-title {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 4px;
}

.docs-group-subtitle {
    font-size: 13px;
    color: #64748b;
}

.docs-group-intro-guide {
    margin-top: 8px;
}

.simple-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.simple-category {
    margin-bottom: 12px;
}

.simple-category-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.simple-docs {
    list-style: none;
    padding-right: 12px;
    margin: 0;
}

    .simple-docs li {
        margin-bottom: 4px;
    }

    .simple-docs a {
        text-decoration: none;
        color: #2563eb;
        font-size: 13px;
    }

        .simple-docs a:hover {
            text-decoration: underline;
        }
