/* ============================================
   College Scholarship & Tuition Search Styles
   ============================================ */

/* --- Search Container --- */
.cs-search-container {
    max-width: 960px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* --- Search Box --- */
.cs-search-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2.5rem;
    color: #fff;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    margin-bottom: 2rem;
}

.cs-search-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #fff;
    line-height: 1.3;
}

.cs-search-subtitle {
    font-size: 1.05rem;
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
}

/* --- Form Layout --- */
.cs-search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cs-form-row {
    display: flex;
    gap: 1rem;
}

.cs-form-row-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.cs-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cs-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: rgba(255,255,255,0.95);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-search-form input[type="text"],
.cs-search-form input[type="number"],
.cs-search-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: none;
    outline: none;
    box-sizing: border-box;
}

.cs-search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.cs-search-form input:focus,
.cs-search-form select:focus {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.cs-search-form select {
    appearance: auto;
    cursor: pointer;
}

.cs-search-form select option {
    color: #333;
    background: #fff;
}

/* --- Input with prefix (dollar sign) --- */
.cs-input-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.cs-prefix {
    position: absolute;
    left: 1rem;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 1;
}

.cs-input-prefix input {
    padding-left: 2rem !important;
}

/* --- Submit Button --- */
.cs-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.cs-submit-btn {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 0.85rem 3rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 220px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.cs-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    background: #f8f9ff;
}

.cs-submit-btn:active {
    transform: translateY(0);
}

.cs-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* --- Spinner --- */
.cs-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: cs-spin 0.6s linear infinite;
}

.cs-spinner-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
    border-color: rgba(102, 126, 234, 0.15);
    border-top-color: #667eea;
}

@keyframes cs-spin {
    to { transform: rotate(360deg); }
}

/* --- Loading --- */
.cs-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.cs-loading-content p {
    margin-top: 1rem;
    color: #666;
    font-size: 1rem;
}

/* --- Error --- */
.cs-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

/* --- Results Container --- */
.cs-results-container {
    margin-top: 1.5rem;
}

.cs-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8e8e8;
}

.cs-results-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.cs-reset-btn {
    background: none;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-reset-btn:hover {
    background: #667eea;
    color: #fff;
}

/* --- Filter Bar --- */
.cs-filter-bar {
    margin-bottom: 1.5rem;
}

.cs-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eef2ff;
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.cs-filter-tag-remove {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

/* --- School Result Card --- */
.cs-schools-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cs-school-result {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cs-school-result:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.cs-school-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.cs-school-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

.cs-school-type {
    flex-shrink: 0;
    background: #eef2ff;
    color: #667eea;
    padding: 0.2rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* --- School Details Grid --- */
.cs-school-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.cs-detail {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cs-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.cs-detail-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.cs-tuition {
    color: #059669;
    font-weight: 700;
    font-size: 1.05rem;
}

.cs-scholarship-info {
    color: #7c3aed;
    font-weight: 500;
}

/* --- School Actions --- */
.cs-school-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.cs-visit-site {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.cs-visit-site:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* --- Pagination --- */
.cs-pagination-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.cs-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cs-page-btn {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cs-page-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.cs-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cs-page-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* --- No Results --- */
.cs-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    background: #f9f9f9;
    border-radius: 12px;
}

.cs-no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* --- Compact form (for results page) --- */
.cs-compact {
    padding: 1.5rem 2rem;
}

.cs-search-form-compact .cs-form-row-three {
    grid-template-columns: 2fr 1fr auto;
    align-items: end;
}

.cs-form-actions-compact {
    margin-top: 0;
}

.cs-form-actions-compact .cs-submit-btn {
    padding: 0.75rem 2rem;
    min-width: auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .cs-search-box {
        padding: 1.5rem;
    }

    .cs-search-title {
        font-size: 1.4rem;
    }

    .cs-form-row-three {
        grid-template-columns: 1fr;
    }

    .cs-school-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cs-school-details {
        grid-template-columns: 1fr 1fr;
    }

    .cs-results-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .cs-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cs-search-form-compact .cs-form-row-three {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cs-school-details {
        grid-template-columns: 1fr;
    }

    .cs-submit-btn {
        width: 100%;
    }
}
