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

.listing-section {
    margin-top: 32px;
    min-width: 0;
}

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

.section-heading h2,
.table-empty h3 {
    margin: 0 0 8px;
}

.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-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: var(--panel);
    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: var(--panel);
    font-size: var(--font-size-small);
    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 var(--white-20);
}

.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 var(--white-20);
}

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

.table-venue-type-filter-content {
    display: grid;
    padding-top: 8px;
    border-top: 1px solid var(--white-20);
}

.table-checkbox-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--panel);
    font-size: var(--font-size-regular);
    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: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ball-dot-yellow);
}

.table-price-filter-fields-content {
    display: grid;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--white-20);
}

.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: var(--panel);
    font-size: var(--font-size-regular);
    font-weight: 800;
}

.table-price-range-value-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    color: var(--panel);
    font-size: var(--font-size-regular);
    font-weight: 700;
    white-space: nowrap;
}

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

.table-filter-footer-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--white-20);
}

.table-filter-selected-count-copy {
    min-width: 0;
    margin: 0;
    color: var(--panel);
    font-size: var(--font-size-regular);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.table-clear-filters {
    color: var(--panel);
    font-size: var(--font-size-regular);
    font-weight: 700;
}

.table-clear-filters:hover,
.table-clear-filters:focus-visible {
    color: var(--highlight-pale);
    outline: none;
}

.table-grid-card-content {
    min-width: 0;
    background: var(--panel-warm-glass);
    border: var(--card-border-external) solid var(--accent);
    border-radius: 0;
    box-shadow: 0 16px 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: var(--card-border-internal) solid var(--accent-rule);
    background: var(--panel-bright-strong);
}

.table-results-status-copy {
    min-width: 0;
    margin: 0;
    color: var(--accent-dark);
    font-size: var(--font-size-regular);
    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: 16px 20px;
    border-bottom: 4px 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: var(--panel-warm-row);
    vertical-align: middle;
}

.club-table tbody tr:nth-child(even) td {
    background: var(--panel-warm-row-alt);
}

.club-table tbody tr[data-table-row]:hover td {
    background: var(--ball-dot-yellow-soft);
}

.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;
}

.club-table .sort-button {
    min-height: var(--catalog-table-header-height);
}

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

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

.numeric-cell,
.club-table td[data-label="Type"] {
    font-size: var(--font-size-small);
    font-weight: 800;
    line-height: 16px;
    overflow-wrap: anywhere;
}

.numeric-cell {
    font-variant-numeric: tabular-nums;
    text-align: center;
}

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

.club-table tbody td.table-empty,
.mobile-results-empty-content.table-empty {
    padding: 32px 24px;
    background: linear-gradient(180deg, var(--panel-soft) 0%, var(--panel) 100%);
}

.table-empty p {
    margin: 8px 0 0;
}

.club-link {
    display: inline-block;
    justify-self: start;
    min-width: 0;
    color: inherit;
    font-size: var(--font-size-regular);
    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,
.table-location-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.table-location-subtitle {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: var(--font-size-small);
    line-height: 16px;
}

.table-location-city-link {
    display: inline-block;
    justify-self: start;
    min-width: 0;
    font-size: var(--font-size-small);
    font-weight: 800;
    line-height: 16px;
    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: var(--font-size-small);
    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: var(--booking-subtle);
    border-color: var(--booking-border);
}

.table-pagination-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 16px 20px 20px;
    border-top: 4px solid var(--white-18);
    background: var(--accent);
}

.table-pagination-summary {
    min-width: 0;
    margin: 0;
    color: var(--panel);
    font-size: var(--font-size-regular);
    font-weight: 700;
    overflow-wrap: anywhere;
}

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

.table-pagination-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    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: 40px;
    padding: 12px 16px;
    border: 4px solid var(--white-22);
    background: var(--accent-dark);
    color: var(--panel);
    font-size: var(--font-size-regular);
    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: var(--panel-bright-glass);
    color: var(--ink);
}

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

.table-pagination-jump-label {
    min-width: 0;
    color: var(--panel);
    font-size: var(--font-size-small);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.table-pagination-jump-input {
    width: 76px;
    min-height: 40px;
    padding: 8px 12px;
    border: 4px solid var(--accent);
    background: var(--panel-bright-glass);
    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: 40px;
    padding: 12px 16px;
    border: 4px solid var(--white-22);
    background: var(--accent-dark);
    color: var(--panel);
    font: inherit;
    font-size: var(--font-size-regular);
    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 4px var(--booking-border);
}

.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 4px var(--booking-border);
}

@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 var(--white-20);
    }

    .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: var(--panel-warm-glass);
    }

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

    .mobile-results-empty-content h3 {
        --mobile-results-empty-heading-font-size: 28px;

        font-size: var(--mobile-results-empty-heading-font-size);
        line-height: calc(var(--mobile-results-empty-heading-font-size) + 4px);
        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: var(--card-border-external) solid var(--accent-rule);
        border-radius: 0;
        background: var(--panel-bright-glass);
    }

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

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

    .mobile-result-location-subtitle {
        margin: 0;
        color: var(--muted);
        font-size: var(--font-size-small);
        font-weight: 700;
        line-height: 16px;
        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: var(--font-size-small);
        font-weight: 800;
        letter-spacing: 0;
        line-height: 12px;
        text-transform: uppercase;
    }

    .mobile-result-stat-value {
        margin: 0;
        color: var(--ink);
        font-size: var(--font-size-regular);
        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: var(--font-size-small);
        font-weight: 800;
        line-height: 16px;
        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;
    }

    .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-mobile-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-mobile-font-size);
        line-height: var(--menu-bar-line-height);
        letter-spacing: 0;
    }

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

    .listing-section .mobile-result-card-title {
        font-size: var(--font-size-regular);
        line-height: 20px;
    }
}

@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%;
    }
}
