/* Modern Documentation Style */
:root {
    --sidebar-width: 320px;
    --primary-color: #4A6782;
    --secondary-color: #F8981D;
    --bg-color: #f5f7fa;
    --text-color: #353833;
    --border-color: #d0d9e0;
    --hover-color: #bb7a2a;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* We handle scrolling in the containers */
    color: var(--text-color);
    background-color: #fff;
}

#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    z-index: 100;
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
}

#sidebar-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
}

#sidebar-header h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

#sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Container for Frame Content in Sidebar */
.sidebar-frame-container {
    padding: 0 15px;
}

.sidebar-frame-container h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-frame-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-frame-container li {
    margin-bottom: 5px;
}

.sidebar-frame-container a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-frame-container a:hover {
    background-color: rgba(74, 103, 130, 0.1);
    color: var(--hover-color);
}

.sidebar-frame-container a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Main Content Area */
#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#content-area {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 0;
    background-color: white;
}

#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--primary-color);
    display: none;
}

#content-area.loading #loader {
    display: block;
}

#content-area.loading > *:not(#loader) {
    opacity: 0.3;
    pointer-events: none;
}

/* Search Box */
#search-container {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

#search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 103, 130, 0.2);
}


#sidebar-content a.active {
    background-color: var(--primary-color);
    color: white !important;
}

#main-container {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

/* Hide the legacy top/bottom nav since we have our own sidebar */
#content-area .topNav, #content-area .bottomNav {
    display: none !important;
}
