/* Base Layout Structure */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: #1e293b;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
}

#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
    background-color: #f8fafc;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1035;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
}

/* Mobile & Tablet Overrides (<= 768px) */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px; /* Hidden off-screen by default */
        height: 100vh;
        overflow-y: auto;
        box-shadow: none;
    }

    #sidebar.active {
        left: 0; /* Slide in */
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    }

    #content {
        padding: 12px;
    }
}

/* Sidebar Navigation Links */
#sidebar a,
#sidebar .sidebar-link {
    color: #cbd5e1; /* Soft off-white / light slate */
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 2px;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover state */
#sidebar a:hover,
#sidebar .sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Active current route state */
#sidebar a.active,
#sidebar .sidebar-link.active {
    color: #ffffff;
    background-color: #0d6efd; /* Bootstrap primary highlight */
    font-weight: 600;
}

/* Sidebar Icons Alignment & Color */
#sidebar a i,
#sidebar .sidebar-link i {
    font-size: 1.1rem;
    margin-right: 10px;
    color: inherit;
}

/* Sidebar Headings/Section Labels */
#sidebar .sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: #94a3b8;
    padding: 12px 14px 6px;
    font-weight: 700;
}

/* Interactive Selection Cards (Mock Test Builder) */
.selection-pill {
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    user-select: none;
}

.selection-pill:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

/* Enforce clear checkbox styling */
.selection-pill .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    border: 2px solid #94a3b8;
}

.selection-pill .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Highlight row when selected */
.selection-pill:has(.form-check-input:checked) {
    background-color: #eff6ff !important;
    border-color: #3b82f6 !important;
}