/* CSS for Projectworlds Multi-School V2 Documentation */
:root {
    --primary-color: #4a6cf7;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --content-bg: #f8fafc;
    --text-color: #334155;
    --heading-color: #0f172a;
    --border-color: #cbd5e1;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    display: flex;
    min-height: 100vh;
    background-color: var(--content-bg);
    color: var(--text-color);
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #334155;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.25rem;
    font-weight: bold;
    border-bottom: 1px solid #334155;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Mobile Top Bar → now always-visible top bar */
.top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    top: 0;
    left: 280px;
    /* starts after the sidebar */
    right: 0;
    height: 56px;
    z-index: 996;
    box-sizing: border-box;
    border-bottom: 1px solid #334155;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Mobile-only elements hidden by default on desktop */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.mobile-logo {
    display: none;
    font-size: 1rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Top-bar search pill (desktop) */
.topbar-search-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    padding: 9px 16px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    text-align: left;
}

.topbar-search-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #e2e8f0;
}

.topbar-search-btn i {
    flex-shrink: 0;
    font-size: 0.85rem;
}

.topbar-search-label {
    flex: 1;
}

.topbar-search-btn kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.7rem;
    padding: 2px 7px;
    flex-shrink: 0;
}

.topbar-search-spacer {
    width: 44px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 76px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* On mobile: top-bar spans full width */
    .top-bar {
        left: 0;
        padding: 0 16px;
        gap: 10px;
    }

    /* Show hamburger + panel label on mobile */
    .mobile-menu-btn {
        display: flex !important;
    }

    .mobile-logo {
        display: block !important;
        flex: 1;
    }

    /* Collapse search pill to icon-only on mobile */
    .topbar-search-label,
    .topbar-search-btn kbd,
    .topbar-search-spacer {
        display: none;
    }

    .topbar-search-btn {
        flex: 0 0 auto;
        max-width: none;
        margin: 0;
        padding: 8px 10px;
        border-radius: 8px;
    }

    .sidebar-close-btn {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.95rem;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar-nav .nav-header {
    padding: 16px 24px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px 60px;
    padding-top: 96px;
    /* 56px topbar + 40px gap */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

h3 {
    font-size: 1.5rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

ul,
ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

code {
    background-color: #e2e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

pre {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Components */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-info {
    background-color: #e0f2fe;
    border-color: #0284c7;
    color: #0c4a6e;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #d97706;
    color: #78350f;
}

.screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    height: 300px;
    margin: 20px 0;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.step-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 20px;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-weight: bold;
}

/* Sitemap Styling */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 3rem;
}

.sitemap-column h3.sitemap-column-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

.sitemap-column-header.mgmt {
    border-color: #3498db;
    color: #2c3e50;
}

.sitemap-column-header.exam {
    border-color: #e74c3c;
    color: #2c3e50;
}

.sitemap-column-header.ops {
    border-color: #27ae60;
    color: #2c3e50;
}

.sitemap-group {
    margin-bottom: 20px;
}

.sitemap-group-title {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.sitemap-list {
    padding-left: 20px;
    font-size: 0.95rem;
    color: #666;
}

/* Feature Highlights */
.feature-highlights {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #3498db;
    margin-bottom: 2rem;
}

.feature-highlights h3 {
    margin-top: 0;
    color: #2c3e50;
}

.feature-highlights ul {
    margin-bottom: 0;
    padding-left: 20px;
}

/* Table Styling */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th {
    background-color: #f1f5f9;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #cbd5e1;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

/* ─── Alert Success ──────────────────────────────────────────────────────── */
.alert-success {
    background-color: #dcfce7;
    border-color: #16a34a;
    color: #14532d;
}

/* ─── Global Search ──────────────────────────────────────────────────────── */

/* Search trigger button (inside sidebar header) */
.gs-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.8rem;
    margin: 0 16px 12px;
    padding: 8px 12px;
    width: calc(100% - 32px);
    transition: background 0.2s, border-color 0.2s;
}

.gs-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.gs-trigger-btn .gs-trigger-label {
    flex: 1;
    text-align: left;
}

.gs-trigger-btn kbd {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: inherit;
    font-size: 0.7rem;
    padding: 2px 5px;
}