/* ============================================
   SeatData.io Public Events & Performers CSS
   Uses CSS custom properties from public_theme.css
   ============================================ */

/* ============================================
   Webflow CSS Override
   The Webflow base CSS sets body color/bg with its
   own variables that do not respond to data-theme.
   We override here with higher specificity to ensure
   the theme system controls text and background colors
   on events/performers pages.
   ============================================ */
.events-page,
.performers-page,
.performer-page,
.venues-page,
.venue-page {
    color: var(--text-primary);
}

.events-page *,
.performers-page *,
.performer-page *,
.venues-page *,
.venue-page * {
    /* Reset Webflow's link-color--link-primary on all descendants */
    --link-color--link-primary: var(--text-primary);
}

/* Override Webflow's blanket a { color; text-decoration } for our pages */
.events-page a,
.performers-page a,
.performer-page a,
.venues-page a,
.venue-page a {
    text-decoration: none;
}

/* Force Webflow container to behave as a block element */
.events-page .section-2 .container-2,
.performers-page .section-2 .container-2,
.performer-page .section-2 .container-2,
.venues-page .section-2 .container-2,
.venue-page .section-2 .container-2 {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Autocomplete styles moved to search_autocomplete.css (loaded globally from base.html) */

/* ============================================
   Stats Bar
   ============================================ */
.events-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 20px 0 8px;
    flex-wrap: wrap;
}

.events-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.events-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Colored stat values matching the mockup */
.events-stat-value.stat-events {
    color: var(--color-blue);
}

.events-stat-value.stat-performers {
    color: var(--color-coral);
}

.events-stat-value.stat-venues {
    color: #4ade80;
}

.events-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Vertical divider between stats */
.events-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .events-stats-bar {
        gap: 16px;
    }

    .events-stat-value {
        font-size: 22px;
    }

    .events-stat-divider {
        height: 24px;
    }
}

/* ============================================
   Category Tabs (pill-shaped)
   ============================================ */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    text-decoration: none;
}

.category-tab.active {
    color: #fff;
    background: var(--color-blue);
    border-color: var(--color-blue);
}

/* ============================================
   Sort Controls
   ============================================ */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 16px;
    font-size: 13px;
}

.sort-controls-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: 4px;
}

.sort-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sort-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    text-decoration: none;
}

.sort-link.active {
    color: var(--color-blue);
    font-weight: 600;
    background: rgba(61, 164, 223, 0.08);
}

/* ============================================
   Trending Performers Row -- Vertical Card Layout
   Matches mockup: centered text, initials on top,
   name below, event count, demand badge at bottom
   ============================================ */
.trending-section {
    padding: 8px 0 16px;
}

.trending-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.trending-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.trending-section-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.trending-section-link:hover {
    color: var(--color-coral);
    text-decoration: none;
}

.trending-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.trending-row::-webkit-scrollbar {
    display: none;
}

/* Vertical card layout matching mockup */
.performer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 18px;
    min-width: 130px;
    max-width: 150px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.performer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: var(--color-blue);
    text-decoration: none;
    color: inherit;
}

/* Circular gradient avatar for performer initials */
.performer-card-initials {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.performer-card-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

.performer-card-events {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

.performer-card-demand {
    margin-top: 6px;
}

/* Compact demand pill inside performer cards */
.performer-card-demand .demand-pill {
    padding: 1px 8px;
    font-size: 9px;
}

/* ============================================
   Leaderboard Table
   ============================================ */
.leaderboard-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.leaderboard-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-primary);
}

.leaderboard-table thead th {
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    text-align: left;
}

.leaderboard-table thead th.col-rank {
    width: 40px;
    text-align: left;
    padding-left: 12px;
}

.leaderboard-table thead th.col-price {
    text-align: right;
}

.leaderboard-table thead th.col-demand {
    text-align: right;
}

.leaderboard-table tbody tr {
    transition: background 0.15s ease;
}

.leaderboard-table tbody tr:nth-child(even) {
    background: var(--table-row-alt);
}

.leaderboard-table tbody tr:hover {
    background: var(--table-hover);
}

.leaderboard-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color);
}

/* Cell padding and alignment */
.leaderboard-table tbody td {
    padding: 12px 12px;
    vertical-align: middle;
}

/* Cell-specific styles */
.leaderboard-table .leaderboard-rank {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    padding-left: 12px;
}

.leaderboard-table .leaderboard-event-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 280px;
}

.leaderboard-table .leaderboard-event-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.leaderboard-table .leaderboard-event-name a:hover {
    color: var(--color-blue);
}

/* Performer column -- blue links */
.leaderboard-table .leaderboard-performer {
    color: var(--text-primary);
}

.leaderboard-table .leaderboard-performer a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.leaderboard-table .leaderboard-performer a:hover {
    color: var(--color-coral);
}

.leaderboard-table .leaderboard-venue {
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tier 3 — Tertiary pivot (venue). Subordinate to performer (Tier 2) so the
   two columns don't compete as equal blue links. Dotted underline gives a
   clear "soft link / footnote" affordance that reads as interactive without
   shouting. The ", City, ST" suffix stays muted outside the <a>. */
.leaderboard-table .leaderboard-venue a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--text-secondary);
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.leaderboard-table .leaderboard-venue a:hover {
    color: var(--color-blue);
    text-decoration-color: var(--color-blue);
    text-decoration-style: solid;
}

.leaderboard-table .leaderboard-date {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Price cell -- right-aligned, green, bold */
.leaderboard-table .leaderboard-price-cell {
    text-align: right;
}

.leaderboard-table .leaderboard-price {
    font-weight: 700;
    color: var(--color-price);
    white-space: nowrap;
}

.leaderboard-table .leaderboard-price-tbd {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
}

/* Demand cell -- right-aligned */
.leaderboard-table .leaderboard-demand-cell {
    text-align: right;
}

/* ============================================
   Demand Pills -- solid colored backgrounds
   No dot, just text on colored background
   ============================================ */
.demand-pill {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Hide demand-pill-dot (legacy markup, pills use solid background only) */
.demand-pill-dot {
    display: none;
}

/* Extreme -- purple solid background */
.demand-pill.demand-extreme,
.demand-pill.extreme {
    color: #fff;
    background: var(--demand-extreme);
}

/* High -- coral solid background */
.demand-pill.demand-high,
.demand-pill.high {
    color: #fff;
    background: var(--demand-high);
}

/* Moderate -- orange solid background */
.demand-pill.demand-moderate,
.demand-pill.moderate {
    color: #fff;
    background: var(--demand-moderate);
}

/* Low -- blue solid background */
.demand-pill.demand-low,
.demand-pill.low {
    color: #fff;
    background: var(--demand-low);
}

/* None / New -- gray solid background */
.demand-pill.demand-new,
.demand-pill.demand-none,
.demand-pill.new,
.demand-pill.none {
    color: #fff;
    background: var(--demand-none);
}

/* ============================================
   Pagination -- Inside table wrapper
   ============================================ */

/* In-table pagination (inside leaderboard-wrapper) */
.leaderboard-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-secondary);
}

.leaderboard-pagination-info {
    font-size: 11px;
    color: var(--text-secondary);
}

.leaderboard-pagination-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.leaderboard-pagination-btns .pagination-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Standalone pagination (legacy, kept for other pages) */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px 0 48px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    color: var(--color-blue);
    border-color: var(--color-blue);
    text-decoration: none;
}

.pagination-btn.active {
    color: #fff;
    background: var(--color-blue);
    border-color: var(--color-blue);
}

.pagination-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Past Events Link
   ============================================ */
.past-events-link-row {
    text-align: center;
    padding: 0 0 64px;
}

.past-events-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-blue);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.past-events-link:hover {
    border-color: var(--color-blue);
    background: rgba(61, 164, 223, 0.06);
    color: var(--color-blue);
    text-decoration: none;
}

.past-events-link svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Performer Detail Page
   ============================================ */
.performer-page {
    min-height: 100vh;
    background: var(--bg-tertiary);
    position: relative;
}

.performer-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(61, 164, 223, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

.performer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.performer-header {
    padding: 16px 0 24px;
}

.performer-header h1 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    line-height: 1.2;
}

/* Demand badge displayed inline with the performer name heading */
.performer-header-demand {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.45em;
    font-weight: 700;
    white-space: nowrap;
    color: #fff;
    vertical-align: middle;
}

.performer-event-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

/* Stats Cards */
.performer-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.performer-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.performer-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin: 0 0 6px;
}

.performer-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-price);
    letter-spacing: -0.02em;
    margin: 0;
}

.performer-stat-value.no-data {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

@media (max-width: 576px) {
    .performer-stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .performer-stat-card {
        padding: 16px;
    }

    .performer-stat-value {
        font-size: 22px;
    }
}

/* Past events gated section */
.past-events-gate {
    text-align: center;
    padding: 40px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 32px;
}

.past-events-gate p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.past-events-gate .gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--color-blue) 0%, #2E8BC0 100%);
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(61, 164, 223, 0.25);
}

.past-events-gate .gate-btn:hover {
    background: var(--color-coral);
    box-shadow: 0 4px 12px rgba(236, 93, 80, 0.3);
    text-decoration: none;
    color: #fff;
}

/* ============================================
   Performers Index Page
   ============================================ */
.performers-page {
    min-height: 100vh;
    background: var(--bg-tertiary);
    position: relative;
}

.performers-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(61, 164, 223, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

.performers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.performers-header {
    text-align: center;
    padding: 16px 0 24px;
}

.performers-header h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.performers-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Events Index Page (Redesigned)
   ============================================ */
.events-page {
    min-height: 100vh;
    background: var(--bg-tertiary);
    position: relative;
}

.events-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(180deg, rgba(61, 164, 223, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

.events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Breadcrumbs (shared)
   ============================================ */
.events-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 32px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.events-breadcrumb a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.events-breadcrumb a:hover {
    color: var(--color-coral);
}

.events-breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ============================================
   Page Header (shared)
   ============================================ */
.events-header {
    text-align: center;
    padding: 16px 0 24px;
}

.events-header h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.events-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Search in events page (hero variant)
   ============================================ */
.events-search-row {
    display: flex;
    justify-content: center;
    padding: 16px 0 24px;
}

.events-search-row .search-autocomplete {
    max-width: 560px;
}

.events-search-row .search-autocomplete-input {
    padding: 12px 16px 12px 44px;
    font-size: 15px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.events-search-row .search-autocomplete-input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(61, 164, 223, 0.15), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.events-search-row .search-autocomplete-icon {
    left: 14px;
    width: 20px;
    height: 20px;
}

.events-search-row .search-autocomplete-dropdown {
    min-width: 100%;
}

/* ============================================
   Empty State
   ============================================ */
.events-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Visually hidden utility */
.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;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .events-container,
    .performers-container,
    .performer-container {
        padding: 0 16px;
    }

    .events-breadcrumb {
        padding-top: 24px;
        margin-bottom: 16px;
    }

    .events-header,
    .performers-header {
        padding: 8px 0 16px;
    }

    .performer-header {
        padding: 8px 0 16px;
    }

    .leaderboard-table {
        font-size: 12px;
    }

    .leaderboard-table thead th,
    .leaderboard-table tbody td {
        padding: 10px 10px;
    }

    .trending-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .leaderboard-pagination {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .performer-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .performer-stat-card {
        padding: 14px 10px;
    }

    .performer-stat-value {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .events-header h1,
    .performers-header h1 {
        font-size: 24px;
    }

    .events-header p,
    .performers-header p {
        font-size: 14px;
    }

    .performer-header h1 {
        font-size: 22px;
    }

    .performer-header-demand {
        font-size: 11px;
        padding: 2px 10px;
    }

    .leaderboard-table thead th,
    .leaderboard-table tbody td {
        padding: 8px 8px;
    }
}

/* ==========================================================================
   Venues pages — added 2026-04-09
   ========================================================================== */

.venues-page,
.venue-page {
    min-height: 100vh;
    background: var(--bg-tertiary);
    position: relative;
}

.venues-page::before,
.venue-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(180deg, rgba(61, 164, 223, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

.venues-container,
.venue-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.venues-header,
.venue-header {
    padding: 16px 0 24px;
    margin-bottom: 1rem;
}

.venues-header h1,
.venue-header h1 {
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    font-size: 2rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.venues-header p {
    color: var(--text-secondary);
    margin: 0;
}

.venue-location-subtitle {
    color: var(--text-secondary);
    margin: 4px 0 0;
    font-size: 15px;
}

/* State filter row (under USA tab) */
.venue-state-filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.venue-state-filter {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
}

.clear-filter-link {
    color: var(--color-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

.clear-filter-link:hover {
    text-decoration: underline;
}

/* Utility: hide a table column on narrow viewports */
@media (max-width: 576px) {
    .col-hide-sm {
        display: none;
    }
}

/* Venue overview — 2-column split: stats 2x2 (left) + map tile (right).
   Stat cards stretch to fill the column height so both columns read as a
   single balanced dashboard row. The map fills the right column via flex
   grow, matching the left column's height exactly. */
.venue-overview {
    margin: 0 0 2rem;
}

.venue-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.venue-stats-2x2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    min-height: 260px;
}

.venue-stats-2x2 .performer-stat-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.venue-stats-2x2 .performer-stat-value.stat-upcoming {
    color: var(--color-blue);
}

/* Fallback: 4-metric stats row, used when the map embed key is unset so
   the page doesn't render a lopsided 2-column grid with an empty right side. */
.venue-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.venue-stats-grid .performer-stat-value.stat-upcoming {
    color: var(--color-blue);
}

@media (max-width: 768px) {
    .venue-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Map card — always renders as a peer tile inside .venue-overview-grid.
   Flex column so the iframe grows to fill the remaining height above the
   caption bar, matching the stats column on the left. */
.venue-map-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    min-height: 260px;
}

.venue-map-card-iframe-wrap {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    position: relative;
}

.venue-map-card-iframe-wrap iframe {
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
    transition: filter 0.25s ease;
}

/* Dark mode for the Google Maps Embed iframe.
   The Embed API has no native dark theme, so we invert the iframe colors
   and hue-rotate to keep land/water/roads looking roughly natural. This is
   the standard workaround; note the filter also affects place labels and
   the Google logo, which is an acceptable tradeoff for theme coherence. */
[data-theme="dark"] .venue-map-card-iframe-wrap iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.venue-map-card-caption {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    font-size: 0.75rem;
    line-height: 1.2;
}

.venue-map-caption-label {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.venue-map-caption-link {
    color: var(--color-blue);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.venue-map-caption-link:hover {
    text-decoration: underline;
}

/* Tablet: stack map under a 2x2 stats grid */
@media (max-width: 768px) {
    .venue-overview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .venue-stats-2x2 {
        min-height: 0;
    }

    .venue-map-card {
        min-height: 0;
    }

    .venue-map-card-iframe-wrap {
        aspect-ratio: 16 / 9;
        flex: 0 0 auto;
        min-height: 240px;
        max-height: 320px;
    }
}

/* Mobile: tighten spacing and use 4:3 for legibility */
@media (max-width: 576px) {
    .venue-stats-2x2 {
        gap: 0.75rem;
    }

    .venue-map-card-iframe-wrap {
        aspect-ratio: 4 / 3;
        min-height: 220px;
        max-height: 280px;
    }

    .venue-map-card-caption {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* Section headers on the detail page */
.venue-section-header {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

/* Past events section */
.past-events-section {
    margin-top: 2.5rem;
}

.past-events-section h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.past-events-helper {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.past-events-helper a {
    color: var(--color-blue);
    text-decoration: underline;
}

.leaderboard-wrapper.is-past tbody {
    opacity: 0.72;
}

.leaderboard-wrapper.is-past tbody tr.event-row-past,
.leaderboard-wrapper.is-past tbody tr.event-row-past:hover {
    cursor: default;
    background: transparent;
}

.leaderboard-wrapper.is-past .leaderboard-event-name {
    color: var(--text-primary);
}

.demand-pill.is-past {
    background: var(--demand-none, #6b7280) !important;
    color: #fff;
}

.past-events-cta {
    margin-top: 1rem;
    text-align: center;
}
