/**
 * GSI Portal Public Styles
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* Container */
.gsi-portal-container {
    display: flex;
    gap: 20px;
    font-family: 'DM Sans', 'Inter', 'Segoe UI', sans-serif;
    color: #333;
}

/* Sidebar (Categories) */
.gsi-sidebar {
    width: 250px;
    background: #2d3748;
    /* Dark Gray/Blue */
    color: white;
    padding: 20px;
    border-radius: 12px;
    flex-shrink: 0;
}

.gsi-sidebar h3 {
    color: white;
    margin-bottom: 15px;
    font-family: 'DM Sans', sans-serif;
    font-size: 29.22px;
    font-weight: 600;
    /* Semibold */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.gsi-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gsi-cat-item {
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    font-family: 'DM Sans', sans-serif;
    font-size: 19.48px;
    font-weight: 400;
    /* Regular */
}

.gsi-cat-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gsi-cat-item.active {
    background: #ecc94b;
    /* Mustard Yellow from screenshot */
    color: #1a202c;
    font-weight: 600;
    /* Kept bold/semibold as usually active states are heavier, user asked for shadow specifically */
    box-shadow: 0px 3.9px 3.9px 0px rgba(0, 0, 0, 0.25);
}

/* Main Content */
.gsi-main-content {
    flex-grow: 1;
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    min-width: 0;
    /* CRITICAL: Prevents flex item from expanding beyond container */
    width: 100%;
    /* Ensures it takes available space but respects parent width */
}

.gsi-category-title {
    margin-bottom: 20px;
    color: #2d3748;
    font-family: 'DM Sans', sans-serif;
    font-size: 23.38px;
    font-weight: 700;
    /* Bold */
}

/* Tabs Navigation (Years/Subcats) */
.gsi-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;

    /* Scroll Behavior */
    overflow-x: auto !important;
    white-space: nowrap;
    scrollbar-width: auto;
    /* Show scrollbar in Firefox */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */

    /* Layout constraints */
    max-width: 100%;
    width: 100%;

    padding-bottom: 15px;
    /* Space for scrollbar */
    border-bottom: 1px solid transparent;
    /* Prevent layout jump */
}

/* Custom Scrollbar for Webkit (Chrome/Safari/Edge) */
.gsi-tabs-nav::-webkit-scrollbar {
    height: 8px;
    /* Visible height */
    display: block !important;
}

.gsi-tabs-nav::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 4px;
}

.gsi-tabs-nav::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 4px;
}

.gsi-tabs-nav::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Ensure tabs don't shrink */
.gsi-tab-btn {
    flex-shrink: 0;
}

.gsi-tab-btn {
    padding: 8px 20px;
    background: #edf2f7;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-weight: 500;
    color: #4a5568;
    border: 1px solid transparent;
}

.gsi-tab-btn:hover {
    background: #e2e8f0;
}

.gsi-tab-btn.active {
    background: #2b6cb0;
    /* Blue */
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Document List */
.gsi-doc-list {
    display: none;
    /* Hidden by default, JS toggles it */
    flex-direction: column;
    gap: 10px;
}

.gsi-doc-list.active {
    display: flex;
}

.gsi-doc-item {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.1s;
}

.gsi-doc-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.gsi-doc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 17.53px;
    font-weight: 400;
    /* Regular */
}

.gsi-doc-title i {
    color: #a0aec0;
}

.gsi-btn-view {
    background: #2b6cb0;
    color: white;
    padding: 6px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.gsi-btn-view:hover {
    background: #2c5282;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .gsi-portal-container {
        flex-direction: column;
    }

    .gsi-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 10px;
        gap: 10px;
    }

    .gsi-cat-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .gsi-sidebar h3 {
        display: none;
    }
}