/* Docs CSS - Inspired by Laravel Documentation */

:root {
    --doc-bg: #ffffff;
    --doc-text: #334155;
    --doc-sidebar-bg: #f8fafc;
    --doc-sidebar-border: #e2e8f0;
    --doc-link: #1053f3; /* Tayssir Blue instead of Laravel Red */
    --doc-link-hover: #0d44c8;
    --doc-accent: #d35400; /* Tayssir Orange */
    --doc-code-bg: #f1f5f9;
    --doc-header-height: 64px;
}

body.docs-page {
    background-color: var(--doc-bg);
    color: var(--doc-text);
    font-family: 'Manrope', 'Nunito', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Header */
.docs-header {
    height: var(--doc-header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--doc-sidebar-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.docs-header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.docs-header-brand img {
    height: 32px;
}

.docs-header-search {
    margin-left: auto;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.docs-header-search:hover {
    border-color: #cbd5e1;
}

/* Layout */
.docs-container {
    display: flex;
    max-width: 1536px;
    margin: 0 auto;
    padding-top: var(--doc-header-height);
    min-height: 100vh;
}

/* Left Sidebar */
.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: var(--doc-header-height);
    height: calc(100vh - var(--doc-header-height));
    overflow-y: auto;
    padding: 2rem 1.5rem;
    background: var(--doc-bg);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.docs-nav-group {
    margin-bottom: 2rem;
}

.docs-nav-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.docs-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav-list li a {
    display: block;
    padding: 0.375rem 0;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.docs-nav-list li a:hover {
    color: var(--doc-link);
}

.docs-nav-list li a.active {
    color: var(--doc-link);
    font-weight: 600;
}

/* Main Content */
.docs-main {
    flex-grow: 1;
    padding: 3rem 4rem 5rem 4rem;
    min-width: 0; /* allows text truncation if needed */
    max-width: 900px;
}

.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.docs-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--doc-sidebar-border);
}

.docs-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.docs-content p {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 1.5rem;
}

.docs-content a:not(.btn) {
    color: var(--doc-link);
    text-decoration: none;
    font-weight: 500;
}

.docs-content a:not(.btn):hover {
    text-decoration: underline;
}

.docs-content ul, .docs-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.docs-content li {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.docs-note {
    background: #eff6ff;
    border-left: 4px solid var(--doc-link);
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 2rem 0;
}

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

.docs-note.warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

/* Code Blocks */
.docs-content pre {
    background: #1e293b;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 2rem 0;
}

.docs-content code {
    background: var(--doc-code-bg);
    color: #c53030;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.docs-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Right Sidebar (Table of Contents) */
.docs-toc {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: var(--doc-header-height);
    height: calc(100vh - var(--doc-header-height));
    padding: 3rem 1.5rem;
    overflow-y: auto;
    display: none; /* Hidden on small screens */
}

@media (min-width: 1280px) {
    .docs-toc {
        display: block;
    }
}

.docs-toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.docs-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--doc-sidebar-border);
}

.docs-toc-list li a {
    display: block;
    padding: 0.25rem 0 0.25rem 1rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    margin-left: -1px;
}

.docs-toc-list li a:hover {
    color: #0f172a;
    border-left-color: #cbd5e1;
}

.docs-toc-list li a.active {
    color: var(--doc-link);
    border-left-color: var(--doc-link);
    font-weight: 500;
}

/* Mobile Menu Toggle */
.docs-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #475569;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .docs-sidebar {
        position: fixed;
        left: -100%;
        top: var(--doc-header-height);
        z-index: 40;
        background: white;
        transition: left 0.3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.05);
    }

    .docs-sidebar.open {
        left: 0;
    }

    .docs-main {
        padding: 2rem 1.5rem;
    }

    .docs-menu-toggle {
        display: block;
    }
}
