/* ===================================================================
   University Finder — Minimal design matching Program Explorer
   =================================================================== */

/* ===== Page Header ===== */
.uf-page-header {
    background: linear-gradient(135deg, #fff7ed 0%, #fff1e6 50%, #ffe8d6 100%);
    padding: 2rem 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* Subtle orange top accent */
.uf-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 126, 95, 0.35) 20%,
        rgba(255, 126, 95, 0.55) 50%,
        rgba(255, 126, 95, 0.35) 80%,
        transparent 100%
    );
}

.uf-header-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.uf-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7e5f 0%, #ff9a76 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    box-shadow: 0 2px 8px rgba(255, 126, 95, 0.25);
}

.uf-header-title {
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: #1E2A3A;
    margin: 0;
    line-height: 1.2;
}

.uf-header-subtitle {
    font-size: 0.9rem;
    color: #546E7A;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
    max-width: 480px;
}

.uf-header-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.uf-stat {
    font-size: 0.85rem;
    color: #546E7A;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 5px;
}

.uf-stat i {
    color: #ff7e5f;
    font-size: 0.75rem;
}

.uf-stat strong {
    font-weight: 700;
    color: #ff7e5f;
}

.uf-stat-divider {
    width: 1px;
    height: 14px;
    background: #d4c5b9;
}

/* ===== Layout ===== */
.uf-explorer-wrapper {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Filter sidebar — reuse program-explorer filter-sidebar styles */
.uf-explorer-wrapper .filter-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.uf-explorer-wrapper .filter-sidebar::-webkit-scrollbar {
    width: 4px;
}
.uf-explorer-wrapper .filter-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.uf-explorer-wrapper .filter-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.uf-explorer-wrapper .main-content {
    flex: 1;
    min-width: 0;
}

/* ===== Cards ===== */
.uf-card {
    background: #ffffff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.uf-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.uf-results-card {
    padding: 0;
}

.uf-favorites-card {
    padding: 0;
    margin-bottom: 2rem;
}

/* ===== Card Header ===== */
.uf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eef1f5;
    background: #fafbfd;
}

.uf-card-header-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1E2A3A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

.uf-title-icon {
    color: #ff7e5f;
    font-size: 0.8rem;
}

.uf-fav-icon {
    color: #ef4444;
    font-size: 0.8rem;
}

.uf-school-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: #94a3b8;
    white-space: nowrap;
}

/* ===== School List (rows) ===== */
.uf-schools-list {
    display: flex;
    flex-direction: column;
}

/* ===== School Row ===== */
.uf-school-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    position: relative;
}

.uf-school-row:last-child {
    border-bottom: none;
}

.uf-school-row:hover {
    background: #fefaf8;
}

/* Subtle orange left accent on hover */
.uf-school-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #ff7e5f;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.uf-school-row:hover::before {
    opacity: 1;
}

/* School info */
.uf-school-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.uf-school-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1E2A3A;
    text-decoration: none;
    transition: color 0.15s ease;
    line-height: 1.3;
}

a.uf-school-name:hover {
    color: #ff7e5f;
}

a.uf-school-name:visited {
    color: #1E2A3A;
}

.uf-school-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #64748b;
}

.uf-school-location i {
    color: #ff7e5f;
    font-size: 0.65rem;
}

/* State badge */
.uf-state-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #fff7ed;
    color: #c2410c;
    white-space: nowrap;
}

/* Heart button */
.uf-heart-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.uf-heart-btn:hover {
    color: #fb7185;
    background: rgba(251, 113, 133, 0.08);
    transform: scale(1.15);
}

.uf-heart-btn.active {
    color: #ef4444;
    background: transparent;
}

.uf-heart-btn.active:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.06);
}

/* ===== Pagination ===== */
.uf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #eef1f5;
    background: #fafbfd;
}

.uf-page-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.uf-page-dots .page-indicator {
    width: auto;
    height: auto;
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef1f5;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uf-page-dots .page-indicator:hover {
    background: #e2e8f0;
}

.uf-page-dots .page-indicator.active {
    background: #ff7e5f;
    color: #ffffff;
}

.uf-page-dots .page-ellipsis {
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0 2px;
}

.uf-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    color: #ff7e5f;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.uf-page-btn:hover:not(:disabled) {
    background: #ff7e5f;
    color: #ffffff;
    border-color: #ff7e5f;
}

.uf-page-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    border-color: #eef1f5;
}

/* ===== Favorites Section ===== */
#school-favorites-list {
    display: flex;
    flex-direction: column;
}

.uf-fav-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    position: relative;
}

.uf-fav-row:last-child {
    border-bottom: none;
}

.uf-fav-row:hover {
    background: #fefaf8;
}

.uf-fav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.uf-remove-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.uf-remove-btn:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

.uf-apply-btn {
    padding: 7px 14px;
    background: #ff7e5f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.uf-apply-btn:hover {
    background: #e86b4f;
    box-shadow: 0 2px 8px rgba(255, 126, 95, 0.25);
}

.uf-apply-btn.active {
    background: #22c55e;
    color: #ffffff;
}

.uf-apply-btn.active:hover {
    background: #16a34a;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

/* Empty state */
.uf-empty-favorites {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.uf-empty-favorites i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.uf-empty-favorites p {
    margin: 0.2rem 0;
    max-width: 300px;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ===== Mobile Filter Toggle ===== */
.uf-mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 10px 16px;
    margin: 0 0 12px 0;
    background: #ffffff;
    color: #ff7e5f;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.uf-mobile-filter-toggle:hover {
    border-color: #ff7e5f;
    background: #fff7ed;
}

/* Filter backdrop */
.filter-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-backdrop.show {
    display: block;
    opacity: 1;
}

/* Loading / Error / No Results */
.loading,
.error,
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.loading i,
.error i,
.no-results i {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.error {
    color: #e53e3e;
}

/* ===================================================================
   Responsive
   =================================================================== */

@media (max-width: 900px) {
    .uf-explorer-wrapper {
        display: block;
    }

    .uf-explorer-wrapper .filter-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        overflow-y: auto;
        padding: 1rem;
        margin: 0;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .uf-explorer-wrapper .filter-sidebar.show {
        left: 0;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    }

    .uf-mobile-filter-toggle {
        display: flex;
    }

    .uf-explorer-wrapper .main-content {
        padding: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .uf-page-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .uf-header-title {
        font-size: 1.4rem;
    }

    .uf-header-subtitle {
        font-size: 0.8rem;
    }

    .uf-header-icon {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    /* Card header stacks */
    .uf-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 16px;
    }

    /* School rows: info full width, actions below */
    .uf-school-row {
        grid-template-columns: 1fr auto auto;
        gap: 8px 12px;
        padding: 12px 16px;
    }

    .uf-school-info {
        grid-column: 1 / -1;
    }

    /* Favorites stack */
    .uf-fav-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 16px;
    }

    .uf-fav-actions {
        justify-content: flex-start;
    }

    /* Pagination tighter */
    .uf-pagination {
        padding: 12px 16px;
        gap: 8px;
    }

    .uf-page-btn {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .uf-school-row {
        padding: 10px 14px;
    }

    .uf-school-name {
        font-size: 0.8rem;
    }

    .uf-school-location {
        font-size: 0.75rem;
    }

    .uf-state-badge {
        font-size: 0.65rem;
        padding: 2px 8px;
    }

    .uf-heart-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .uf-remove-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .uf-page-dots .page-indicator {
        min-width: 24px;
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .uf-header-title {
        font-size: 1.2rem;
    }

    .uf-header-stats {
        flex-direction: column;
        gap: 0.25rem;
    }

    .uf-stat-divider {
        display: none;
    }
}

@media (max-width: 400px) {
    .uf-card-header {
        padding: 10px 12px;
    }

    .uf-card-header-title {
        font-size: 0.8rem;
    }

    .uf-school-row,
    .uf-fav-row {
        padding: 10px 12px;
    }
}

/* Touch devices */
@media (hover: none) {
    .uf-heart-btn:active,
    .uf-remove-btn:active,
    .uf-page-btn:active:not(:disabled) {
        transform: scale(0.95);
    }
}

/* Finder metric filters — footnote under tuition/GPA/class size */
.uf-filter-hint {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
    margin: -0.25rem 0 0.25rem 0;
}
