.ucpc-academic-browser {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    color: #222;
    font-family: inherit;
}

.ucpc-filter-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 20px;
    align-items: end;
    padding: 24px;
    margin-bottom: 30px;
    background: #f7f7f8;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.ucpc-filter-field {
    min-width: 0;
}

.ucpc-filter-field label {
    display: block;
    margin: 0 0 8px;
    color: #262626;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.ucpc-select-wrap {
    position: relative;
    width: 100%;
}

/* Prevent theme select enhancers from drawing a second control/arrow. */
.ucpc-select-wrap > .nice-select,
.ucpc-select-wrap > .select2,
.ucpc-select-wrap > .select2-container,
.ucpc-select-wrap > .choices,
.ucpc-select-wrap > .chosen-container {
    display: none !important;
}

.ucpc-select-wrap::before,
.ucpc-select-wrap::after {
    content: none !important;
    display: none !important;
}

.ucpc-select-arrow {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
}


.ucpc-filter-panel .ucpc-select-wrap > select {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 10px 42px 10px 14px !important;
    color: #222 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #d1d5db !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    outline: none;
}

.ucpc-filter-panel .ucpc-select-wrap > select:hover {
    border-color: #9ca3af;
}

.ucpc-filter-panel .ucpc-select-wrap > select:focus {
    border-color: #555 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .08) !important;
    outline: none !important;
}

.ucpc-filter-panel .ucpc-select-wrap > select:disabled {
    cursor: wait;
    opacity: .65;
}

.ucpc-reset-filters {
    min-height: 48px;
    padding: 10px 20px;
    color: #fff;
    background: #252525;
    border: 1px solid #252525;
    border-radius: 7px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ucpc-reset-filters:hover,
.ucpc-reset-filters:focus {
    background: #000;
}

.ucpc-front-status {
    min-height: 0;
    margin: -12px 0 18px;
    color: #6b7280;
    font-size: 14px;
}

.ucpc-academic-browser.is-loading .ucpc-front-results {
    opacity: .55;
    pointer-events: none;
}

.ucpc-city-section {
    margin: 0 0 42px;
}

.ucpc-city-heading {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #222;
}

.ucpc-heading-kicker {
    display: block;
    margin-bottom: 3px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ucpc-city-heading h2,
.ucpc-campus-heading h3,
.ucpc-faculty-heading h4 {
    color: #1f2937;
    font-family: inherit;
}

.ucpc-city-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.ucpc-campus-card {
    overflow: hidden;
    margin-bottom: 26px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.ucpc-campus-heading {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 22px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.ucpc-campus-heading h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
}

.ucpc-campus-meta {
    display: flex;
    max-width: 50%;
    flex-wrap: wrap;
    gap: 5px 14px;
    justify-content: flex-end;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
}

.ucpc-faculty-block {
    padding: 22px;
}

.ucpc-faculty-block + .ucpc-faculty-block {
    border-top: 1px solid #e5e7eb;
}

.ucpc-faculty-heading {
    margin-bottom: 14px;
}

.ucpc-faculty-heading h4 {
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.35;
}

.ucpc-faculty-description,
.ucpc-program-description,
.ucpc-other-details {
    color: #565d67;
    font-size: 13px;
    line-height: 1.55;
}

.ucpc-faculty-description p,
.ucpc-program-description p,
.ucpc-other-details p {
    margin: 4px 0;
}

.ucpc-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.ucpc-program-table {
    width: 100%;
    min-width: 940px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    font-size: 14px;
}

.ucpc-program-table th,
.ucpc-program-table td {
    box-sizing: border-box;
    padding: 13px 14px;
    border: 0;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.45;
    text-align: left;
    vertical-align: top;
}

.ucpc-program-table th:last-child,
.ucpc-program-table td:last-child {
    border-right: 0;
}

.ucpc-program-table tbody tr:last-child td {
    border-bottom: 0;
}

.ucpc-program-table thead th {
    color: #fff;
    background: #252525;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}

.ucpc-program-table tbody tr:nth-child(even):not(.ucpc-program-extra-row) td {
    background: #fafafa;
}

.ucpc-program-table td strong {
    color: #202124;
}

.ucpc-program-description {
    min-width: 220px;
    margin-top: 5px;
}

.ucpc-program-extra-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    background: #f8f9fa;
    color: #565d67;
    font-size: 13px;
}

.ucpc-empty-state {
    padding: 30px 20px;
    color: #6b7280;
    background: #fafafa;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
}

.ucpc-empty-inline {
    margin: 18px 22px;
    padding: 18px;
}

.ucpc-error-state {
    color: #8a1f11;
}

@media (max-width: 900px) {
    .ucpc-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .ucpc-filter-actions {
        grid-column: 1 / -1;
    }

    .ucpc-reset-filters {
        width: 100%;
    }

    .ucpc-campus-heading {
        display: block;
    }

    .ucpc-campus-meta {
        max-width: none;
        margin-top: 10px;
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .ucpc-filter-panel {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px;
    }

    .ucpc-filter-actions {
        grid-column: auto;
    }

    .ucpc-campus-heading,
    .ucpc-faculty-block {
        padding: 17px;
    }

    .ucpc-city-section {
        margin-bottom: 30px;
    }
}


.ucpc-results-summary {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

.ucpc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 28px 0 8px;
}

.ucpc-page-btn {
    min-width: 110px;
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid #252525;
    border-radius: 7px;
    background: #252525;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ucpc-page-btn:hover,
.ucpc-page-btn:focus {
    background: #000;
}

.ucpc-page-btn:disabled {
    border-color: #d1d5db;
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.ucpc-page-status {
    min-width: 100px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 1050px) {
    .ucpc-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ucpc-filter-actions {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .ucpc-filter-panel {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px;
    }

    .ucpc-filter-actions,
    .ucpc-reset-filters {
        width: 100%;
    }

    .ucpc-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Hide theme-added selection markers inside this plugin only. */
.ucpc-filter-panel .ucpc-select-wrap .select2-selection__arrow,
.ucpc-filter-panel .ucpc-select-wrap .select2-selection__rendered::before,
.ucpc-filter-panel .ucpc-select-wrap .nice-select::before,
.ucpc-filter-panel .ucpc-select-wrap .nice-select::after {
    display: none !important;
    content: none !important;
}

/*
 * UCP Colleges frontend color scheme.
 * Reference palette:
 * - Navy: #112c4e
 * - Red: #991b1e
 * - Alternating row: #e7e9ed
 */
.ucpc-academic-browser {
    color: #112c4e;
}

.ucpc-filter-panel {
    background: #f7f7f8;
    border-color: #e0e3e7;
    border-radius: 10px;
}

.ucpc-filter-field label {
    color: #112c4e;
}

.ucpc-filter-panel .ucpc-select-wrap > select {
    color: #112c4e !important;
    background-color: #ffffff !important;
    border-color: #d8dce2 !important;
}

.ucpc-filter-panel .ucpc-select-wrap > select:hover {
    border-color: #112c4e !important;
}

.ucpc-filter-panel .ucpc-select-wrap > select:focus {
    border-color: #991b1e !important;
    box-shadow: 0 0 0 2px rgba(153, 27, 30, 0.12) !important;
}

.ucpc-select-arrow {
    border-right-color: #112c4e;
    border-bottom-color: #112c4e;
}

.ucpc-reset-filters,
.ucpc-page-btn {
    color: #ffffff;
    background: #112c4e;
    border-color: #112c4e;
}

.ucpc-reset-filters:hover,
.ucpc-reset-filters:focus,
.ucpc-page-btn:hover,
.ucpc-page-btn:focus {
    color: #ffffff;
    background: #991b1e;
    border-color: #991b1e;
}

.ucpc-front-status,
.ucpc-results-summary,
.ucpc-page-status {
    color: #112c4e;
}

.ucpc-city-heading {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 0;
}

.ucpc-heading-kicker {
    color: #991b1e;
}

.ucpc-city-heading h2,
.ucpc-campus-heading h3,
.ucpc-faculty-heading h4 {
    color: #991b1e;
}

.ucpc-city-heading h2 {
    font-weight: 700;
}

.ucpc-campus-card {
    border-color: #e0e3e7;
    border-radius: 0;
}

.ucpc-campus-heading {
    color: #ffffff;
    background: #112c4e;
    border-bottom: 0;
}

.ucpc-campus-heading h3,
.ucpc-campus-heading .ucpc-heading-kicker,
.ucpc-campus-heading .ucpc-campus-meta {
    color: #ffffff;
}

.ucpc-faculty-block + .ucpc-faculty-block {
    border-top-color: #e0e3e7;
}

.ucpc-faculty-heading h4 {
    font-size: 22px;
    font-weight: 700;
}

.ucpc-faculty-description,
.ucpc-program-description,
.ucpc-other-details {
    color: #112c4e;
}

.ucpc-table-scroll {
    border-color: #d9dde3;
    border-radius: 0;
}

.ucpc-program-table {
    color: #112c4e;
    background: #ffffff;
}

.ucpc-program-table th,
.ucpc-program-table td {
    border-right: 0;
    border-bottom-color: #ffffff;
}

.ucpc-program-table thead th {
    color: #ffffff;
    background: #112c4e;
    font-size: 14px;
    font-weight: 700;
}

.ucpc-program-table tbody tr:not(.ucpc-program-extra-row) td {
    background: #ffffff;
}

.ucpc-program-table tbody tr:nth-child(even):not(.ucpc-program-extra-row) td {
    background: #e7e9ed;
}

.ucpc-program-table td strong {
    color: #112c4e;
}

.ucpc-program-extra-row td {
    color: #112c4e;
    background: #f4f5f7;
}

.ucpc-empty-state {
    color: #112c4e;
    background: #f7f7f8;
    border-color: #d8dce2;
}

.ucpc-error-state {
    color: #991b1e;
}

.ucpc-page-btn:disabled {
    color: #7f8995;
    background: #e7e9ed;
    border-color: #d8dce2;
}
