/*
 * Copyright (c) 2026 Philip Necsulescu.
 * All rights reserved.
 */

.listing-section {
    margin-top: 2rem;
    min-width: 0;
}

.section-heading p,
.table-empty p {
    color: var(--muted);
}

.section-heading h2,
.table-empty h3 {
    margin: 0 0 0.4rem;
    font-size: 2rem;
}

.table-shell {
    display: grid;
    gap: 0;
    min-width: 0;
}

.table-shell .table-grid-card-content {
    transition: opacity 0.16s ease;
}

.table-shell--loading .table-grid-card-content {
    opacity: 0.62;
}

.table-filter-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.table-filter-group-icon {
    display: block;
    fill: currentColor;
    flex: 0 0 auto;
}

.table-filter-panel-content {
    min-width: 0;
    padding: 12px 0 0;
    background: transparent;
    border-radius: 0;
    color: #ffffff;
    box-shadow: none;
}

.table-filter-panel-content[hidden] {
    display: none;
}

.table-filter-groups-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "price price schema schema"
        "venue venue schema schema";
    gap: 12px;
    align-items: start;
}

.table-filter-group-content {
    display: block;
    width: 100%;
    min-width: 0;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
    break-inside: avoid;
}

.table-filter-group-content--pricing {
    grid-area: price;
}

.table-filter-group-content--venue-type {
    grid-area: venue;
}

.table-filter-schema-groups-content {
    display: grid;
    grid-area: schema;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: start;
    min-width: 0;
}

.table-filter-schema-groups-content #programming-filter {
    grid-column: 1;
    grid-row: 1;
}

.table-filter-schema-groups-content #amenity-filter {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.table-filter-schema-groups-content #court-type-filter {
    grid-column: 1;
}

.table-filter-group-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    margin: 0 0 4px;
    padding: 0;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 20px;
    text-transform: uppercase;
}

.table-filter-schema-groups-content #court-type-filter .table-filter-group-label {
    display: flex;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.table-filter-group-icon {
    width: 16px;
    height: 16px;
    opacity: 0.92;
}

.table-filter-group-icon--amenity,
.table-filter-group-icon--court-type {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 1;
}

.table-checkbox-filter-options-content {
    display: grid;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.table-checkbox-filter-options-content--stacked {
    gap: 8px;
}

.table-venue-type-filter-content {
    display: grid;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.table-checkbox-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.table-checkbox-filter-option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.table-checkbox-filter-option:hover,
.table-checkbox-filter-option:focus-within {
    color: var(--ball-dot-yellow);
}

.table-checkbox-filter-option input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--ball-dot-yellow);
}

.table-price-filter-fields-content {
    display: grid;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.table-price-range-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.table-price-range-heading-content {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.table-price-range-heading {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.table-price-range-value-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.table-price-range-value-copy output {
    color: var(--ball-dot-yellow);
    font-weight: 800;
}

.table-price-dual-slider-content {
    --price-range-start: 0%;
    --price-range-end: 100%;
    position: relative;
    min-height: 32px;
}

.table-price-slider-track,
.table-price-slider-fill {
    position: absolute;
    top: 50%;
    height: 8px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.table-price-slider-track {
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.26);
}

.table-price-slider-fill {
    left: var(--price-range-start);
    right: calc(100% - var(--price-range-end));
    background: var(--ball-dot-yellow);
}

.table-price-dual-slider-content input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--ball-dot-yellow);
    appearance: none;
    cursor: pointer;
    pointer-events: none;
}

.table-price-dual-slider-content input[type="range"][data-price-range-role="min"] {
    z-index: 2;
}

.table-price-dual-slider-content input[type="range"][data-price-range-role="max"] {
    z-index: 3;
}

.table-price-dual-slider-content input[type="range"]:focus-visible {
    outline: 2px solid var(--ball-dot-yellow);
    outline-offset: 4px;
}

.table-price-dual-slider-content input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

.table-price-dual-slider-content input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -4px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--ball-dot-yellow);
    pointer-events: auto;
    appearance: none;
}

.table-price-dual-slider-content input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

.table-price-dual-slider-content input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--ball-dot-yellow);
    pointer-events: auto;
}

.table-filter-footer-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.table-filter-selected-count-copy {
    min-width: 0;
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.table-clear-filters {
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
}

.table-clear-filters:hover,
.table-clear-filters:focus-visible {
    color: #fff3b8;
    outline: none;
}

.table-grid-card-content {
    min-width: 0;
    background: rgba(255, 250, 243, 0.96);
    border: 4px solid var(--accent);
    border-radius: 0;
    box-shadow: 0 18px 40px var(--shadow-soft);
}

.table-grid-scroll-content {
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-results-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 20px;
    border-bottom: 4px solid var(--accent-rule);
    background: rgba(255, 253, 248, 0.98);
}

.table-results-status-copy {
    min-width: 0;
    margin: 0;
    color: var(--accent-dark);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-results-list-content {
    display: none;
}

.club-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.club-table th,
.club-table td {
    padding: 1.05rem 1.15rem;
    border-bottom: 2px solid var(--accent-rule);
    text-align: left;
    vertical-align: top;
}

.club-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: var(--catalog-table-header-height);
    padding: 0 16px;
    border-bottom: 0;
    background: var(--menu-bar-action-background);
    box-shadow: inset 0 -4px 0 var(--menu-bar-background);
    color: var(--menu-bar-action-color);
    font-size: var(--menu-bar-font-size);
    line-height: var(--menu-bar-line-height);
    letter-spacing: 0;
    text-transform: uppercase;
}

.club-table tbody td {
    background: rgba(255, 252, 248, 0.9);
}

.club-table tbody tr:nth-child(even) td {
    background: rgba(255, 247, 236, 0.88);
}

.club-table tbody tr[data-table-row]:hover td {
    background: rgba(244, 204, 34, 0.08);
}

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

.club-table th:first-child,
.club-table .table-club-cell {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
}

.club-table thead th:nth-child(2),
.club-table .table-location-cell {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.club-table th.numeric-column,
.club-table td.numeric-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.club-table thead th.numeric-column {
    padding-right: 4px;
    padding-left: 4px;
}

.club-table tbody td.numeric-cell {
    padding-right: 8px;
    padding-left: 8px;
}

.sort-button {
    width: 100%;
    min-height: var(--catalog-table-header-height);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: left;
    line-height: inherit;
    cursor: pointer;
}

.sort-button:hover,
.sort-button:focus-visible {
    background: var(--menu-bar-hover-background);
    color: var(--menu-bar-hover-color);
    outline: none;
}

.sort-heading {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: start;
    justify-items: start;
    column-gap: 0.24rem;
}

.sort-label {
    display: block;
    line-height: inherit;
}

.numeric-column {
    text-align: center;
}

.numeric-sort {
    justify-content: center;
}

.numeric-cell {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.sort-chevrons {
    position: relative;
    display: inline-block;
    width: 0.55rem;
    height: 0.85rem;
    flex: 0 0 auto;
    margin-top: 0.06rem;
}

.sort-chevrons::before,
.sort-chevrons::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.sort-chevrons::before {
    top: 0.02rem;
    border-bottom: 6px solid var(--accent-arrow);
}

.sort-chevrons::after {
    bottom: 0.02rem;
    border-top: 6px solid var(--accent-arrow);
}

.sort-button[data-direction="asc"] .sort-chevrons::before {
    border-bottom-color: var(--accent);
}

.sort-button[data-direction="asc"] .sort-chevrons::after {
    border-top-color: var(--accent-arrow-muted);
}

.sort-button[data-direction="desc"] .sort-chevrons::before {
    border-bottom-color: var(--accent-arrow-muted);
}

.sort-button[data-direction="desc"] .sort-chevrons::after {
    border-top-color: var(--accent);
}

tr[data-table-row][hidden],
.table-filter-empty-row[hidden] {
    display: none;
}

.table-empty {
    padding: 2rem 1.4rem;
    background: linear-gradient(180deg, var(--panel-soft) 0%, var(--panel) 100%) !important;
}

.table-empty p {
    margin: 0;
}

.table-empty p {
    margin-top: 0.45rem;
}

.club-link {
    display: inline-block;
    justify-self: start;
    min-width: 0;
    color: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.table-filter-match {
    padding: 0;
    background: var(--ball-dot-blue-soft);
    color: var(--ink);
}

.club-link:hover,
.club-link:focus-visible {
    color: var(--accent-dark);
}

.table-club-content {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.table-location-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.table-location-subtitle {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.table-location-city-link {
    display: inline-block;
    justify-self: start;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.table-location-link {
    color: inherit;
    overflow-wrap: anywhere;
}

.table-location-link:hover,
.table-location-link:focus-visible {
    color: var(--accent-dark);
}

.table-access-cell {
    white-space: nowrap;
}

.table-access-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 176px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 16px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-access-badge--public {
    color: var(--ball-dot-blue);
    background: var(--ball-dot-blue-soft);
    border-color: var(--ball-dot-blue-border);
}

.table-access-badge--member {
    color: var(--accent-dark);
    background: rgba(143, 17, 17, 0.06);
    border-color: rgba(163, 21, 21, 0.14);
}

.table-pagination-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 1rem 1.2rem 1.15rem;
    border-top: 2px solid rgba(255, 255, 255, 0.18);
    background: var(--accent);
}

.table-pagination-summary {
    min-width: 0;
    margin: 0;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.table-pagination-actions-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
    min-width: 0;
}

.table-pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.table-pagination-link,
.table-pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.6rem;
    padding: 0.65rem 1rem;
    border: 2px solid var(--white-22);
    background: var(--accent-dark);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    overflow-wrap: anywhere;
}

.table-pagination-link:hover,
.table-pagination-link:focus-visible {
    background: var(--ball-dot-yellow);
    border-color: var(--ball-dot-yellow);
    color: var(--ink);
    outline: none;
}

.table-pagination-link--disabled {
    opacity: 0.45;
}

.table-pagination-current {
    border-color: var(--accent);
    background: rgba(255, 252, 248, 0.96);
    color: var(--ink);
}

.table-pagination-jump-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
    min-width: 0;
    margin: 0;
}

.table-pagination-jump-label {
    min-width: 0;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.table-pagination-jump-input {
    width: 4.8rem;
    min-height: 2.6rem;
    padding: 0.55rem 0.65rem;
    border: 3px solid var(--accent);
    background: rgba(255, 252, 248, 0.96);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.table-pagination-jump-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0.65rem 1rem;
    border: 2px solid var(--white-22);
    background: var(--accent-dark);
    color: #ffffff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.table-pagination-jump-input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(163, 21, 21, 0.14);
}

.table-pagination-jump-button:hover,
.table-pagination-jump-button:focus-visible {
    background: var(--ball-dot-yellow);
    border-color: var(--ball-dot-yellow);
    color: var(--ink);
    outline: none;
    box-shadow: 0 0 0 3px rgba(163, 21, 21, 0.14);
}

@media (min-width: 801px) and (max-width: 1152px) {
    .table-filter-groups-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "price price"
            "venue venue"
            "schema schema";
        gap: 12px;
    }

    .table-filter-schema-groups-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
    }
}

@media (max-width: 800px) {
    .table-filter-groups-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "price"
            "venue"
            "schema";
    }

    .table-filter-schema-groups-content {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .table-filter-schema-groups-content #programming-filter,
    .table-filter-schema-groups-content #amenity-filter,
    .table-filter-schema-groups-content #court-type-filter {
        grid-column: auto;
        grid-row: auto;
    }

    .table-filter-schema-groups-content #amenity-filter .table-filter-group-label {
        display: flex;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .table-filter-footer-content {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination-content {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination-actions-content {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination-nav {
        justify-content: space-between;
    }

    .table-pagination-jump-content {
        justify-content: space-between;
    }

    .mobile-results-list-content {
        display: grid;
        gap: 12px;
        min-width: 0;
        padding: 12px;
        background: rgba(255, 250, 243, 0.96);
    }

    .mobile-results-empty-content {
        min-width: 0;
        padding: 24px 16px;
    }

    .mobile-results-empty-content h3 {
        font-size: 28px;
        line-height: 32px;
        overflow-wrap: anywhere;
    }

    .mobile-result-card-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(92px, 108px);
        gap: 12px;
        align-items: start;
        min-width: 0;
        padding: 16px;
        border: 2px solid var(--accent-rule);
        border-radius: 0;
        background: rgba(255, 252, 248, 0.96);
    }

    .mobile-result-card-heading-content {
        display: grid;
        gap: 4px;
        min-width: 0;
    }

    .mobile-result-card-title {
        font-size: 18px;
        line-height: 24px;
        overflow-wrap: anywhere;
    }

    .mobile-result-location-subtitle {
        margin: 0;
        color: var(--muted);
        font-size: 15px;
        font-weight: 700;
        line-height: 20px;
        overflow-wrap: anywhere;
    }

    .mobile-result-courts-content {
        display: grid;
        gap: 4px;
        min-width: 0;
        margin: 0;
    }

    .mobile-result-stat-content {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 4px;
        min-width: 0;
        padding: 4px 8px;
        border: 1px solid var(--accent-rule);
        background: var(--panel-soft);
    }

    .mobile-result-stat-label {
        margin: 0;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0;
        line-height: 12px;
        text-transform: uppercase;
    }

    .mobile-result-stat-value {
        margin: 0;
        color: var(--ink);
        font-size: 16px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        line-height: 20px;
    }

    .mobile-result-meta-content {
        display: block;
        grid-column: 1 / -1;
        gap: 12px;
        min-width: 0;
    }

    .mobile-result-type-description {
        min-width: 0;
        margin: 0;
        color: var(--ink);
        font-size: 15px;
        font-weight: 800;
        line-height: 20px;
        overflow-wrap: anywhere;
    }

    .mobile-result-meta-content .table-access-badge {
        width: auto;
        min-width: 124px;
        padding: 0 8px;
        letter-spacing: 0;
    }

    .table-grid-scroll-content {
        display: none;
    }
}

@media (max-width: 400px) {
    .table-results-status-content,
    .mobile-results-list-content {
        padding: 12px 8px;
    }

    .mobile-result-card-content {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .mobile-result-courts-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mobile-result-stat-content {
        display: grid;
        justify-items: center;
        text-align: center;
    }

    .mobile-result-meta-content .table-access-badge {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    .table-pagination-content {
        padding: 12px 8px;
    }

    .table-pagination-nav,
    .table-pagination-jump-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .table-pagination-link,
    .table-pagination-current,
    .table-pagination-jump-input,
    .table-pagination-jump-button {
        width: 100%;
    }
}

@media (max-width: 800px) {
    .listing-section .summary-location-list li + li::before,
    .listing-section .table-filter-group-label,
    .listing-section .table-price-range-heading,
    .listing-section .table-price-range-value-copy,
    .listing-section .club-table thead th,
    .listing-section .table-pagination-jump-label {
        font-size: var(--menu-bar-font-size);
        line-height: var(--menu-bar-line-height);
        letter-spacing: 0;
    }

    .listing-section .mobile-result-stat-label {
        font-size: var(--mobile-body-font-size);
        line-height: var(--mobile-body-line-height);
        letter-spacing: 0;
    }

    .listing-section .club-table thead .sort-button,
    .listing-section .club-table thead .sort-label {
        font-size: var(--menu-bar-font-size);
        line-height: var(--menu-bar-line-height);
        letter-spacing: 0;
    }

    .listing-section .table-access-badge {
        font-size: 12px;
        line-height: 16px;
        letter-spacing: 0;
    }

    .listing-section .mobile-result-card-title {
        font-size: 16px;
        line-height: 20px;
    }

}
