/**
 * College Search Page Styles
 * File: /wp-content/themes/wrestlerfinder/assets/css/college-search.css
 *
 * Depends on search.css for shared layout, sidebar, FacetWP overrides,
 * facet groups, mobile toggle, and pager. This file adds only
 * college-program-specific card styles and grid layout.
 *
 * Mobile-first: 390px base. Breakpoints: 640px (2-col), 1024px (3-col + sidebar).
 */

/* =============================================================================
   Search Stats — dynamic result count
============================================================================= */

.wf-search-stats {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.wf-search-stats__count {
    color: var(--color-primary);
    font-weight: 600;
}

.facetwp-counts {
    color: var(--color-primary);
    font-weight: 600;
}

/* =============================================================================
   College Grid
============================================================================= */

.wf-college-grid {
    /* Grid wraps the .facetwp-template div — pass the grid context through */
}

.wf-college-grid .facetwp-template {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media ( min-width: 640px ) {
    .wf-college-grid .facetwp-template {
        grid-template-columns: repeat( 2, 1fr );
    }
}

@media ( min-width: 1024px ) {
    .wf-college-grid .facetwp-template {
        grid-template-columns: repeat( 3, 1fr );
    }
}

/* =============================================================================
   College Card
============================================================================= */

.wf-college-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.wf-college-card:hover {
    transform: translateY( -3px );
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.wf-college-card__link {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Header — logo + school name + badges */

.wf-college-card__header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-3);
}

/* Logo thumbnail */
.wf-college-card__logo {
    width: 64px;
    height: 64px;
    min-width: 64px;
    background: var(--color-surface-3);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wf-college-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.wf-college-card__logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: white;
    letter-spacing: 0.05em;
}

/* Text column next to logo */
.wf-college-card__header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.wf-college-card__name {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin: 0;
    /* Reserve room for the absolute-positioned .wf-favorite-btn--card
       (36px button + 8px right offset + ~4px breathing room). Long
       school names wrap or truncate underneath instead of colliding
       with the bookmark. */
    padding-right: 48px;
}

.wf-college-card:hover .wf-college-card__name {
    color: var(--color-primary);
}

/* Badges row */

.wf-college-card__badges {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Gender label — prominent, standalone line below school name */

.wf-college-card__gender-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: var(--space-2);
}

.wf-college-card__gender-label--mens {
    color: #60a5fa;
}

.wf-college-card__gender-label--womens {
    color: #f472b6;
}

/* Division badge — per-division color */

.wf-college-card__div-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    line-height: 1;
    white-space: nowrap;
}

/* Division badges — saturated solid fills for scan-at-a-glance contrast
   against the dark card surface. Each sanctioning body owns a distinct
   hue; text color flips between near-black (#0D1117) and white based on
   whichever reads cleaner on that fill. The 0.12-alpha tints used until
   May 2026 were too subtle on dark cards — NCWA in particular blended
   into the surface entirely. */

.wf-badge--div-ncaa-d1 {
    background: var(--color-primary);
    color:      #0D1117;
    border:     1px solid var(--color-primary);
}

.wf-badge--div-ncaa-d2 {
    background: #a855f7;
    color:      #FFFFFF;
    border:     1px solid #a855f7;
}

.wf-badge--div-ncaa-d3 {
    background: #fb923c;
    color:      #0D1117;
    border:     1px solid #fb923c;
}

.wf-badge--div-naia {
    background: #facc15;
    color:      #0D1117;
    border:     1px solid #facc15;
}

/* NJCAA, CCCAA, NCWA each get their own hue now — sharing the muted
   surface-2 treatment hid NCWA badges almost entirely on dark cards.
   Junior-college slug intentionally absent (all 140 production posts
   relabeled to NJCAA in May 2026). */
.wf-badge--div-njcaa {
    background: #22c55e;
    color:      #0D1117;
    border:     1px solid #22c55e;
}

.wf-badge--div-cccaa {
    background: #38bdf8;
    color:      #0D1117;
    border:     1px solid #38bdf8;
}

.wf-badge--div-ncwa {
    background: #f43f5e;
    color:      #FFFFFF;
    border:     1px solid #f43f5e;
}

/* Conference — shown inline below badges */

.wf-college-card__conference {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta — conference + state */

.wf-college-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: auto;
}

.wf-college-card__conf {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.wf-college-card__state {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--color-surface-2);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-subtle);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Separator dot between conf and state when both present */
.wf-college-card__conf + .wf-college-card__state::before {
    content: none;
}

/* Stats — cost + grad rate */

.wf-college-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
    margin-top: auto;
}

.wf-college-card__stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wf-college-card__stat-value {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.wf-college-card__stat-label {
    font-size: 10px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.wf-college-card__na {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-text-subtle);
}

/* =============================================================================
   FacetWP Radio + Checkbox — Unified Visual Override
   ===========================================================================
   ONE shared block for .facetwp-radio + .facetwp-checkbox so the Program Type
   single-select and the Division / State / Locale / Major Area multi-selects
   are visually indistinguishable. Plugin (FacetWP front.css) ships different
   defaults for each — different padding-left, different background-image PNGs,
   different margin-bottom — at base specificity. !important is used on every
   plugin-overriding line because the plugin's stylesheet load order is not
   guaranteed across hosting environments and a cache-warm visitor could
   otherwise see the old visual. Justified here because we're overriding a
   third-party plugin's CSS we don't control.

   Property checklist explicitly covered (per the visual-parity contract):
   padding-left, margin, background-image, background-position, background-size,
   line-height. Position stays default (static) — plugin doesn't set it.
============================================================================= */

.facetwp-radio,
.facetwp-checkbox {
    /* Layout */
    display:        flex;
    align-items:    center;
    gap:            var(--space-2);
    line-height:    1.4;

    /* Spacing — !important kills plugin's padding-left: 20px and
       margin-bottom: 4px from front.css. */
    padding: var(--space-1) 0 !important;
    margin:  0              !important;

    /* Background — !important kills plugin's url(radio.png) / url(checkbox.png)
       shorthand. Explicit -position and -size are belt-and-suspenders in case
       a plugin update changes the shorthand structure. */
    background-image:    none  !important;
    background-position: 0 0   !important;
    background-size:     auto  !important;

    /* Typography + interaction */
    font-size:   var(--text-sm);
    color:       var(--color-text-muted);
    cursor:      pointer;
    user-select: none;
    transition:  color var(--transition-fast);
}

.facetwp-radio:hover,
.facetwp-checkbox:hover {
    color: var(--color-text);
}

.facetwp-radio::before,
.facetwp-checkbox::before {
    content:        '';
    display:        inline-block;
    flex-shrink:    0;
    width:          16px;
    height:         16px;
    border:         1.5px solid var(--color-border);
    border-radius:  3px;
    background:     transparent;
    transition:     border-color var(--transition-fast), background var(--transition-fast);
}

.facetwp-radio.checked,
.facetwp-checkbox.checked {
    color: var(--color-text);
    /* Override plugin's .checked variant (radio-on.png / checkbox-on.png). */
    background-image: none !important;
}

.facetwp-radio.checked::before,
.facetwp-checkbox.checked::before {
    border-color: var(--color-primary);
    background:   var(--color-primary);
}

.facetwp-radio .facetwp-counter,
.facetwp-checkbox .facetwp-counter {
    font-size:   var(--text-xs);
    color:       var(--color-text-subtle);
    margin-left: auto;
}

/* =============================================================================
   FacetWP Search Input — college title search in sidebar
   ===========================================================================
   Scoped to .facetwp-facet-college-search so it doesn't bleed into the
   athlete-search page's own .facetwp-search input. Matches standard site
   form input styling: surface-2 fill, subtle border, primary text color,
   muted placeholder, teal focus ring.
============================================================================= */

.facetwp-facet-college-search .facetwp-search {
    width:         100%;
    box-sizing:    border-box;
    padding:       var(--space-2) var(--space-3);
    background:    var(--color-surface-2);
    border:        1px solid var(--color-border);
    border-radius: var(--radius-md);
    color:         var(--color-text);
    font-family:   inherit;
    font-size:     var(--text-sm);
    line-height:   1.4;
    transition:    border-color var(--transition-fast);
}

.facetwp-facet-college-search .facetwp-search:focus {
    outline:      none;
    border-color: var(--color-primary);
}

.facetwp-facet-college-search .facetwp-search::placeholder {
    color: var(--color-text-muted);
}

/* FacetWP "Show more/less" toggle */
.facetwp-toggle {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-primary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
}

.facetwp-toggle:hover {
    text-decoration: underline;
}

/* FacetWP Proximity facet */
.facetwp-type-proximity input[type="text"] {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    margin-bottom: var(--space-2);
}

.facetwp-type-proximity input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.facetwp-type-proximity select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    appearance: none;
}

/* =============================================================================
   Active Filter Chips
============================================================================= */

.wf-active-filters {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.wf-active-filters__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.wf-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--color-teal-dim);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-full);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-primary);
    white-space: nowrap;
}

.wf-filter-chip__label {
    font-weight: 500;
}

.wf-filter-chip__remove {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: var(--text-sm);
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity var(--transition-base);
}

.wf-filter-chip__remove:hover {
    opacity: 1;
}

.wf-active-filters__clear {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    text-decoration: underline;
    transition: color var(--transition-base);
}

.wf-active-filters__clear:hover {
    color: var(--color-text);
}

/* =============================================================================
   No Results — scoped to college grid
============================================================================= */

.wf-college-grid .wf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-16) var(--space-4);
    font-size: var(--text-base);
    color: var(--color-text-muted);
}
