/* style.css */

/* GLOBAL & LAYOUT */
#pnp-cutoff-app {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    line-height: 1.6;
}

#pnp-cutoff-app .container {
    max-width: 1800px;
    width: 100%;
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(19, 41, 75, 0.1);
}

/* HEADERS */
#pnp-cutoff-app h1, #pnp-cutoff-app h2, #pnp-cutoff-app h3 {
    font-family: 'Montserrat', sans-serif;
    color: #13294B;
    font-weight: 800;
}

#pnp-cutoff-app .pnp-title {
    border-bottom: 3px solid #FF5F05;
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
}

#pnp-cutoff-app p {
    color: #555;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

#pnp-cutoff-app .content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* CONTROLS & FILTER SECTION */
#pnp-cutoff-app .controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#pnp-cutoff-app fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

#pnp-cutoff-app fieldset:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

#pnp-cutoff-app legend {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #13294B;
    margin-bottom: 15px;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* THE "CHOICE CHIP" STYLING */
#pnp-cutoff-app #examTypeFilterContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

#pnp-cutoff-app #testNameFilterContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#pnp-cutoff-app #testNameFilterContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

#pnp-cutoff-app .checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background-color: #f0f2f5;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    user-select: none;
    min-height: 44px;
}

#pnp-cutoff-app .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
}

#pnp-cutoff-app .checkbox-label:hover {
    background-color: #e2e6ea;
    transform: translateY(-1px);
}

#pnp-cutoff-app .checkbox-label:has(input:checked) {
    background-color: #13294B;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(19, 41, 75, 0.3);
}

#pnp-cutoff-app .checkbox-label:focus-within {
    border-color: #FF5F05;
}

/* DATA TABLES */
#pnp-cutoff-app #dataContainer {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

#pnp-cutoff-app .placeholder {
    color: #888;
    background-color: #f9f9f9;
    font-style: italic;
    text-align: center;
    padding: 60px;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

#pnp-cutoff-app .exam-group {
    margin-bottom: 40px;
    animation: fadeIn 0.4s ease-out;
}

#pnp-cutoff-app .exam-group h2 {
    background-color: #fff;
    padding: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    border-left: 5px solid #FF5F05;
    padding-left: 15px;
}

#pnp-cutoff-app .test-section h3 {
    color: #13294B;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

#pnp-cutoff-app table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#pnp-cutoff-app table:focus {
    outline: 3px solid #FF5F05;
    outline-offset: 2px;
}
#pnp-cutoff-app th,
#pnp-cutoff-app td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#pnp-cutoff-app th {
    background-color: #13294B;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#pnp-cutoff-app tr:nth-child(even) {
    background-color: #f8f9fa;
}

#pnp-cutoff-app tr:hover {
    background-color: #fff9f5;
}

/* ANIMATION KEYFRAMES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE TWEAKS */
@media (min-width: 992px) {
    #pnp-cutoff-app .content-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    #pnp-cutoff-app .controls {
        flex: 1;
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding-right: 40px;
        border-right: 1px solid #eee;
    }

    #pnp-cutoff-app #dataContainer {
        flex: 1;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        padding-left: 40px;
    }

    #pnp-cutoff-app .controls::-webkit-scrollbar {
        width: 6px;
    }
    #pnp-cutoff-app .controls::-webkit-scrollbar-thumb {
        background: #e0e0e0;
        border-radius: 10px;
    }
}

@media (max-width: 768px) {
    #pnp-cutoff-app .container {
        padding: 20px;
    }

    #pnp-cutoff-app #testNameFilterContainer {
        flex-direction: column;
    }

    #pnp-cutoff-app th,
    #pnp-cutoff-app td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

#pnp-cutoff-app #clearFiltersBtn {
    align-self: flex-start;
    background-color: transparent;
    border: 2px solid #d1d5db;
    color: #666;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: -10px;
}

#pnp-cutoff-app #clearFiltersBtn:hover {
    border-color: #FF5F05;
    color: #FF5F05;
    background-color: #fff5f0;
}

#pnp-cutoff-app #clearFiltersBtn:active {
    transform: translateY(1px);
}

#pnp-cutoff-app .alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

#pnp-cutoff-app .alpha-btn {
    border: 1px solid #e0e0e0;
    background-color: #fff;
    color: #13294B;
    font-size: 0.85rem;
    font-weight: 600;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    font-family: inherit;
}

#pnp-cutoff-app .alpha-btn:hover {
    border-color: #FF5F05;
    color: #FF5F05;
}

#pnp-cutoff-app .alpha-btn:focus-visible {
    outline: none;
    border-color: #FF5F05;
    box-shadow: 0 0 0 3px rgba(255, 95, 5, 0.2);
}

#pnp-cutoff-app .alpha-btn.active {
    background-color: #13294B;
    color: #fff;
    border-color: #13294B;
}

#pnp-cutoff-app .alpha-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
    background-color: #f9f9f9;
}

#pnp-cutoff-app .select-all-label {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    margin-left: auto;
    font-size: 0.85rem;
    padding: 5px 15px;
    min-height: 32px;
    border-radius: 4px;
}

#pnp-cutoff-app .select-all-label:has(input:checked) {
    background-color: #13294B !important;
    color: #fff !important;
    border-color: #13294B !important;
}

#pnp-cutoff-app .year-dropdown {
    padding: 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #13294B;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
}

#pnp-cutoff-app .search-box {
    width: 100%;
    margin-bottom: 10px;
}

#pnp-cutoff-app #courseSearch {
    width: 40%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

#pnp-cutoff-app #courseSearch:focus {
    border-color: #FF5F05;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 95, 5, 0.2);
}