/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure hidden elements never display due to conflicting rules */
[hidden] {
    display: none !important;
}

.hidden {
    display: none !important;
}

:root {
    /* COMEDY CELLAR - Light Theme (VS Code Quiet Light) */
    --primary-color: #F5F5F5;
    /* Quiet Light Bg */
    --secondary-color: #E8E8E8;
    /* Slightly darker */

    /* Accent - Quiet Light Purple */
    --accent-color: #7C5AE3;
    --accent-hover: #6348b6;
    --accent-glow: rgba(124, 90, 227, 0.15);

    /* Time badges - Quiet Light Blue */
    --brand-gradient: #435a8a;

    /* Action buttons - Quiet Light Blue */
    --action-color: #4B69C6;
    --action-hover: #3b53a0;
    --btn-primary-bg: #4B69C6;
    --btn-primary-hover: #3b53a0;

    --text-light: #333333;
    /* Quiet Light Fg */
    --text-muted: #AAAAAA;
    /* Quiet Light Comment */

    --border-color: #E0E0E0;
    --card-bg: #FFFFFF;
    --control-bg: #E8E8E8;
    --hover-bg: #E0E0E0;

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.07);
    --shadow-glow: none;

    --border-radius: 12px;
    --transition: all 0.2s ease;

    /* Minimal mappings */
    --bg: #F5F5F5;
    --fg: #333333;
    --muted: #AAAAAA;
    --border: #E0E0E0;
    --accent: #7C5AE3;

    /* Status Colors - Quiet Light */
    --success-bg: #e2f7dc;
    --success-fg: #448C27;
    /* Green */
    --warning-bg: #fff0d4;
    --warning-fg: #C97200;
    /* Orange */
    --danger-bg: #f9dcdc;
    --danger-fg: #AA0000;
    /* Red */
    --info-bg: #dcebf9;
    --info-fg: #1e3a8a;
    /* High contrast blue */
    /* Blue */

    color-scheme: light;
}

body.dark-mode {
    /* COMEDY CELLAR - Dark Theme (VS Code Monokai Dimmed) */
    --primary-color: #1e1e1e;
    /* Monokai Dimmed Bg */
    --secondary-color: #2e2e2e;
    /* Card Bg */

    /* Accent - Monokai Dimmed Purple */
    --accent-color: #9876aa;
    --accent-hover: #ae81ff;
    /* Bright Purple on hover */
    --accent-glow: rgba(152, 118, 170, 0.15);

    /* Time badges - Monokai Dimmed Comment/Gray */
    --brand-gradient: #75715E;

    /* Action buttons - Monokai Dimmed Red/Pink */
    --action-color: #c7444a;
    /* Dimmed Red */
    --action-hover: #F92672;
    /* Vibrant Red on hover */
    --btn-primary-bg: #c7444a;
    --btn-primary-hover: #F92672;

    --text-light: #c5c8c6;
    /* Dimmed White */
    --text-muted: #75715E;
    /* Dimmed Comment */

    --border-color: #444444;
    --card-bg: #222222;
    --control-bg: rgba(68, 68, 68, 0.4);
    --hover-bg: #333333;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-glow: none;

    --bg: #1e1e1e;
    --fg: #c5c8c6;
    --muted: #75715E;
    --border: #444444;
    --accent: #9876aa;

    /* Status Colors - Monokai Dimmed */
    --success-bg: rgba(135, 146, 45, 0.2);
    --success-fg: #87922d;
    /* Dimmed Green */
    --warning-bg: rgba(196, 193, 116, 0.2);
    --warning-fg: #c4c174;
    /* Dimmed Yellow */
    --danger-bg: rgba(199, 68, 74, 0.2);
    --danger-fg: #c7444a;
    /* Dimmed Red */
    --info-bg: rgba(102, 217, 239, 0.2);
    --info-fg: #66d9ef;
    /* Dimmed Blue */

    color-scheme: dark;
}



body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-color);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    font-size: clamp(14px, 1.8vw, 16px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    background: var(--primary-color);
    overscroll-behavior: none;
}

/* Prevent iOS Safari auto-zoom on inputs (requires >=16px) */
@media (max-width: 640px) {

    .header-controls input,
    .header-controls select,
    .header-controls textarea {
        font-size: 16px;
    }
}

/* Strengthen iOS no-zoom for the specific search input */
@media (max-width: 640px) {
    body.minimal #filter-search {
        font-size: 16px !important;
    }
}

.header-inner .header-controls {
    position: relative;
}

/* Calendar Popup */
.calendar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    /* Nearly invisible - just for click handling */
    z-index: 997;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
}

/* Blur the main content when calendar is open (NOT header!) */
body.calendar-open main,
body.calendar-open .list {
    filter: blur(4px);
    transition: filter 0.2s ease;
    pointer-events: none;
}

/* Ensure header stays crisp and above blur - NEVER blur the header */
header,
body.calendar-open header,
.calendar-open header {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: blur(12px) !important;
    /* Keep existing header blur effect */
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 1001;
    opacity: 1 !important;
}

.calendar-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 16px;
    z-index: 999;
    min-width: 280px;
}

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

.calendar-header button {
    background: transparent;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    color: var(--fg, #333);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header button:hover {
    background: var(--hover-bg, #f0f0f0);
}

.calendar-month-year {
    font-weight: 700;
    font-size: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--hover-bg, #f0f0f0);
}

.calendar-day.selected {
    background: var(--accent, #5c4580);
    color: #fff;
}

.calendar-day.today {
    border: 2px solid var(--accent, #5c4580);
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.empty {
    visibility: hidden;
}

/* Ensure the page header stays above the schedule and visible */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode header {
    background: rgba(9, 9, 11, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
}

/* Dark mode inputs/selects */
body.dark-mode .header-controls select,
body.dark-mode .header-controls input {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: transparent;
    color: var(--text-light);
}

body.dark-mode .header-controls select:hover,
body.dark-mode .header-controls input:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}





/* Hide scrollbars globally */


* {


    scrollbar-width: none !important;


    -ms-overflow-style: none !important;


}


*::-webkit-scrollbar {


    display: none !important;


}







.app {





    min-height: 100vh;





    display: flex;





    flex-direction: column;





}











/* Enhanced Header Styles */





.header {





    background: var(--primary-color);
    /* Fully opaque background to prevent content showing through */





    border-bottom: 1px solid var(--border-color);





    position: sticky;





    top: 0;





    z-index: 200;





    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);





    /* Removed backdrop-filter as it's not needed with opaque background */





}











/* Header is now defined above with more specific rules */











/* .header styles removed to prevent conflicts with the new header styles */
















/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    position: relative;
}

/* Buy Me a Coffee - Pale Yellow */
.bmc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5e6a3;
    /* Pale yellow */
    color: #5a4a2a;
    /* Dark brown text for contrast */
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border: none;
    transition: all 0.3s ease;
    box-shadow: none;
}

.bmc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(245, 230, 163, 0.5), 0 0 30px rgba(245, 230, 163, 0.3);
    background: #edd98b;
}

/* Ensure global btn styles don't override */
a.bmc-btn,
a.bmc-btn:visited,
a.bmc-btn:hover {
    color: #5a4a2a !important;
    /* Keep dark text */
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Buy Me a Coffee Enhanced */
.header-cta {
    display: flex;
    align-items: center;
}

.bmc-fallback {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #FFDD00, #FFC107);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(255, 221, 0, 0.3);
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

.bmc-fallback:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 221, 0, 0.4);
    filter: brightness(1.1);
}

.bmc-emoji {
    line-height: 1;
    font-size: 1.1em;
}

.bmc-label {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Header Main Section */
.header-main {
    padding: 1.5rem 0;
    background: linear-gradient(180deg,
            rgba(189, 147, 249, 0.05) 0%,
            transparent 100%);
}

.brand-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tagline {
    color: var(--text-muted);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

/* Live Stats */
.live-stats {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    flex-wrap: wrap;
}

.stat-pill {
    background: linear-gradient(135deg,
            rgba(189, 147, 249, 0.15),
            rgba(255, 107, 53, 0.1));
    border: 1px solid rgba(189, 147, 249, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-pill:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(189, 147, 249, 0.2);
}

.stat-value {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    color: var(--cyan);
}

.stat-label {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header Search Section */
.header-search-section {
    margin-top: 1.5rem;
}

.header-search {
    max-width: 500px;
    margin: 0;
}

.header-search input {
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.3s ease;
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(189, 147, 249, 0.2);
}

.header-search i {
    left: 1.25rem;
    font-size: 1.1rem;
}

/* Header Filters Section */
.header-filters {
    padding: 1rem 0;
    background: linear-gradient(180deg,
            rgba(68, 71, 90, 0.3) 0%,
            rgba(68, 71, 90, 0.1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-actions {
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
    background: linear-gradient(135deg,
            rgba(189, 147, 249, 0.2),
            rgba(255, 107, 53, 0.1));
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(189, 147, 249, 0.2);
}

.quick-action-btn i {
    font-size: 1em;
    color: var(--accent-color);
}

/* Status Info */
.status-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1rem;
}

.refresh-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: clamp(0.75rem, 2vw, 0.85rem);
}

#refreshStatusIcon {
    font-size: 0.9em;
    animation: slowSpin 3s linear infinite;
}

@keyframes slowSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header h3 {
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.mobile-nav-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-content {
    flex: 1;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-search {
    margin-bottom: 1rem;
}

.mobile-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg,
            rgba(189, 147, 249, 0.1),
            rgba(255, 107, 53, 0.05));
    border: 1px solid rgba(189, 147, 249, 0.3);
    color: var(--text-light);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-quick-action-btn:hover {
    background: linear-gradient(135deg,
            rgba(189, 147, 249, 0.2),
            rgba(255, 107, 53, 0.1));
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.mobile-quick-action-btn i {
    font-size: 1.25rem;
    color: var(--accent-color);
    width: 24px;
    text-align: center;
}

.mobile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.mobile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
}

.mobile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-main {
        flex-direction: column;
        gap: 1.5rem;
    }

    .header-search-section {
        margin-top: 0;
        width: 100%;
    }

    .header-search {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-cta {
        display: none;
    }

    .header-main {
        padding: 1rem 0;
    }

    .brand-section {
        text-align: center;
        align-items: center;
    }

    .live-stats {
        justify-content: center;
    }

    .header-search-section {
        margin-top: 1rem;
    }

    .quick-actions {
        justify-content: center;
    }

    .status-info {
        justify-content: center;
        margin-top: 0.75rem;
    }

    .header-filters {
        padding: 0.75rem 0;
    }
}

@media (max-width: 640px) {
    .tagline {
        font-size: 0.9rem;
    }

    .stat-pill {
        padding: 0.375rem 0.75rem;
        gap: 0.375rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .quick-action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        gap: 0.375rem;
    }

    .quick-action-btn i {
        font-size: 0.9em;
    }

    .mobile-nav-content {
        padding: 1rem;
        gap: 1.5rem;
    }

    .mobile-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        position: sticky;
    }

    .live-stats {
        gap: 0.5rem;
    }

    .stat-pill {
        padding: 0.25rem 0.5rem;
    }

    .quick-actions {
        gap: 0.375rem;
    }

    .quick-action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .refresh-status {
        font-size: 0.7rem;
    }
}

/* Filters */
.filters {
    background: linear-gradient(180deg, rgba(68, 71, 90, 0.35), rgba(68, 71, 90, 0));
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem clamp(1rem, 3vw, 2rem) 0.5rem clamp(1rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
}

.filter-content {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 300ms ease, padding 300ms ease;
}

/* Quick filters chip row */
.quick-filters {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-filters .chip {
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
}

.quick-filters .chip.active {
    border-color: var(--accent-color);
    background: rgba(189, 147, 249, 0.15);
}

.filter-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.filter-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem) 1rem clamp(1rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 1fr repeat(3, minmax(140px, 200px));
    gap: 0.5rem 0.75rem;
}

/* Filters toggle button */
/* Collapse toggle buttons */
.collapse-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    padding: 0.375rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.collapse-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-light);
    border-color: var(--accent-color);
}

.collapse-toggle svg {
    transition: transform 300ms ease;
}

.collapse-toggle[aria-expanded="false"] svg {
    transform: rotate(180deg);
}

/* Filters toggle button */
.filters-toggle {
    display: none;
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    align-items: center;
}

.filters-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 1rem 2rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 220ms ease, opacity 220ms ease;
}

.filters-panel .panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 220ms ease;
    pointer-events: none;
    /* Prevent blocking clicks when hidden */
    z-index: 999;
    /* Ensure below header but above content */
}

.filters-overlay.open {
    opacity: 1;
    pointer-events: auto;
    /* Enable clicks when visible */
}

@media (max-width: 640px) {
    .filters-toggle {
        display: inline-flex;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .filter-bar .search-group,
    .filter-bar .filter-group,
    .filter-bar #refreshBtn {
        display: block;
    }

    .filters-panel {
        padding: 0 1rem 1rem 1rem;
    }

    .filters-panel .panel-row {
        grid-template-columns: 1fr;
    }
}

/* Animated open state */
.filters-panel.open {
    max-height: 80vh;
    opacity: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .filters-panel {
        transition: none;
    }

    .filters-overlay {
        transition: none;
    }
}

/* Mobile slide-in variant */
@media (max-width: 640px) {
    .filters-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 60vh;
        /* Reduced from 70vh for more compact layout */
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        border: 1px solid var(--border-color);
        transform: translateY(100%);
        transition: transform 280ms ease, opacity 280ms ease;
        opacity: 1;
        /* we control with transform on mobile */
        background: var(--secondary-color);
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
        /* Reduced top padding */
        z-index: 1000;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .filters-panel.open {
        transform: translateY(0);
    }

    .filters-panel .panel-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        /* Reduced gap */
    }

    .filters-panel .search-group,
    .filters-panel .filter-group {
        margin-bottom: 0.25rem;
        /* Reduced margin */
    }

    .filters-panel .search-group input,
    .filters-panel .filter-group select {
        padding: 0.625rem 0.75rem;
        /* Slightly smaller padding */
        font-size: 0.9rem;
    }

    .filters-panel .refresh-btn {
        width: 44px;
        /* Slightly smaller */
        height: 44px;
        align-self: center;
        justify-self: center;
    }
}

/* Compact filter bar on small screens */
@media (max-width: 640px) {
    .filters {
        padding: 0.75rem 0;
    }

    /* Reduced from 1.5rem */
    .filter-header {
        padding: 0.75rem 0.75rem 0.375rem 0.75rem;
    }

    .filter-content {
        max-height: none;
    }

    /* Allow natural height on mobile */
    .filter-bar {
        padding: 0 0.75rem 1rem 0.75rem;
        /* Reduced from 1rem */
        gap: 0.375rem;
        /* Reduced from 0.5rem */
    }

    .filters-toggle {
        padding: 0.375rem 0.625rem;
        /* Reduced padding */
        font-size: 0.85rem;
        min-height: 36px;
        /* Smaller touch target */
    }

    .filters-toggle svg {
        width: 16px;
        /* Smaller icon */
        height: 16px;
    }

    .collapse-toggle {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }

    .search-group {
        order: 2;
        width: 100%;
    }

    .filter-group {
        flex: 1 1 48%;
    }

    #refreshBtn {
        order: 3;
    }

    /* Minimize initial footprint on phones */
    .filter-bar .search-group,
    .filter-bar .filter-group,
    .filter-bar #refreshBtn {
        display: none;
    }

    .filters-toggle {
        display: inline-flex;
    }
}

.search-group {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-group input {
    width: 100%;
    padding: clamp(0.375rem, 1.5vw, 0.75rem) clamp(0.625rem, 2vw, 1rem) clamp(0.375rem, 1.5vw, 0.75rem) 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-light);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    line-height: clamp(1.3, 0.1vw + 1.25, 1.5);
    /* fluid line-height for better scaling */
    transition: var(--transition);
}

.search-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-group input::placeholder {
    color: var(--text-muted);
}

/* Clear button inside search inputs */
.search-clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: none;
    width: 1.75rem;
    height: 1.75rem;
}

/* Optional: fine-tune inside mobile nav */
.mobile-nav .search-clear-btn {
    right: 0.75rem;
}

@media (max-width: 480px) {
    .search-clear-btn {
        font-size: 1.2rem;
        right: 0.75rem;
        width: 2rem;
        height: 2rem;
    }
}

/* AutoComplete Dropdown Styles */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: -1px;
}

.autocomplete-category {
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-category:last-child {
    border-bottom: none;
}

.category-header {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--accent-color);
    color: white;
}

.autocomplete-item.selected {
    background: var(--accent-color);
}

.suggestion-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.suggestion-text mark {
    background: rgba(255, 255, 255, 0.3);
    color: inherit;
    padding: 0;
    border-radius: 2px;
}

.autocomplete-item:hover .suggestion-text mark,
.autocomplete-item.selected .suggestion-text mark {
    background: rgba(255, 255, 255, 0.4);
}

.suggestion-meta {
    font-size: 0.75rem;
    opacity: 0.8;
    color: var(--text-muted);
}

.autocomplete-item:hover .suggestion-meta,
.autocomplete-item.selected .suggestion-meta {
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 250px;
    }

    .autocomplete-item {
        padding: 0.6rem 0.8rem;
    }

    .suggestion-text {
        font-size: 0.85rem;
    }

    .suggestion-meta {
        font-size: 0.7rem;
    }

    /* Dropdown sizing now handled by clamp() in base styles */
}

/* Flash highlight when jumping to a show */
@keyframes flashHighlight {
    0% {
        background-color: rgba(92, 69, 128, 0.18);
    }

    60% {
        background-color: rgba(92, 69, 128, 0.10);
    }

    100% {
        background-color: transparent;
    }
}

li.show.flash-highlight {
    animation: flashHighlight 1.2s ease-out 1;
    outline: 2px solid rgba(92, 69, 128, 0.25);
    outline-offset: -2px;
    border-radius: var(--border-radius);
    position: relative;
    /* Ensure it sits above siblings */
    z-index: 10;
}

.filter-group select {
    padding: clamp(0.375rem, 1.5vw, 0.75rem) clamp(0.625rem, 2vw, 1rem);
    background: var(--card-bg);
    border: none;
    border-radius: 999px;
    color: var(--text-light);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    line-height: clamp(1.3, 0.1vw + 1.25, 1.5);
    /* fluid line-height for better scaling */
    transition: var(--transition);
    cursor: pointer;
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-group select option {
    background: var(--secondary-color);
    color: var(--text-light);
}

.refresh-btn {
    padding: 0.75rem;
    background: var(--pink);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
}

.refresh-btn:hover {
    background: var(--cyan);
    transform: rotate(180deg);
}

.force-refresh-btn {
    background: var(--orange);
    color: var(--text-light);
    margin-left: 4px;
}

.force-refresh-btn:hover {
    background: var(--red);
}

.refresh-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.refresh-btn i {
    font-size: 0.9rem;
}

/* Ensure refresh button icons are visible on all backgrounds */
.refresh-btn svg path {
    fill: currentColor;
}

/* Respect reduced motion for refresh button rotation */
@media (prefers-reduced-motion: reduce) {
    .refresh-btn:hover {
        transform: none;
    }
}

/* Stats Section */
.stats-section {
    margin-bottom: 1.25rem;
}

.stats-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.stats-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}

.stats-content {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 300ms ease, margin-bottom 300ms ease;
}

.stats-content.collapsed {
    max-height: 0;
    margin-bottom: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

/* API stats styles removed since all shows are API-sourced */

.stat-item:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.stat-number {
    font-size: clamp(1.25rem, 5vw, 2rem);
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Loading and Error States */
.loading,
.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
}

.error i {
    font-size: 2rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error p {
    color: var(--error-color);
    margin: 0;
}

/* Shows Grid */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-flow: row;
    gap: 1.25rem;
    overflow: visible;
    padding-bottom: 1rem;
}

/* Custom scrollbar for webkit browsers */
/* Remove horizontal scrollbars from card grid on WebKit */
.shows-grid::-webkit-scrollbar {
    height: 0;
}

.shows-grid::-webkit-scrollbar-track {
    background: transparent;
}

.shows-grid::-webkit-scrollbar-thumb {
    background: transparent;
}

.shows-grid::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

.show-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    width: 100%;
}

.show-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    transition: var(--transition);
}

.show-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}

.show-card:hover::before {
    width: 6px;
}

/* Enhanced API Data Styles - Data source indicators removed since all shows are API-sourced */

.show-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(189, 147, 249, 0.1);
    border: 1px solid rgba(189, 147, 249, 0.2);
    border-radius: 8px;
    font-weight: 600;
    color: var(--accent-color);
}

.show-price i {
    color: var(--accent-color);
}

.show-availability {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.show-availability.available {
    background: rgba(80, 250, 123, 0.1);
    border: 1px solid rgba(80, 250, 123, 0.2);
    color: var(--success-color);
}

.show-availability.limited {
    background: rgba(241, 250, 140, 0.1);
    border: 1px solid rgba(241, 250, 140, 0.2);
    color: var(--warning-color);
}

.show-availability.sold-out {
    background: rgba(255, 85, 85, 0.1);
    border: 1px solid rgba(255, 85, 85, 0.2);
    color: var(--error-color);
}

.show-availability.unavailable {
    background: rgba(98, 114, 164, 0.12);
    /* muted */
    border: 1px solid rgba(98, 114, 164, 0.25);
    color: var(--text-muted);
}

.show-availability i {
    font-size: 0.8rem;
}

.capacity {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 0.25rem;
}

.show-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 6px;
    /* Slightly more vertical gap */
    padding: 0 0 0 12px;
    /* Left indent for accent */
    background: none;
    border: none;
    border-left: 3px solid var(--muted);
    /* Accent bar */
    font-size: 0.95rem;
    font-style: italic;
    color: var(--muted);
    overflow-wrap: break-word;
    word-break: break-word;
    /* padding-right removed */
}

.show-note i {
    color: var(--accent);
    font-size: 0.8rem;
}

/* Enhanced show card variants */
.show-card.api-enhanced {
    border-color: var(--success-color);
    box-shadow: 0 4px 16px rgba(80, 250, 123, 0.1);
}

.show-card.api-enhanced::before {
    background: var(--success-color);
}

.show-card.web-data {
    border-color: var(--text-muted);
}

.reservation-btn.sold-out-btn {
    background: var(--error-color);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.reservation-btn.sold-out-btn:hover {
    transform: none;
    box-shadow: none;
}

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

.show-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
}

/* .show-time styles consolidated in Layout & Aesthetic Refinements section */

.show-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.show-location i {
    color: var(--accent-color);
    font-size: 0.8rem;
}

.comedians-list {
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
}

.comedian-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fav-star {
    background: transparent;
    border: none;
    color: #9ca3af;
    /* Gray 400 - Darker default for better visibility */
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fav-star:hover {
    color: #fbbf24;
    /* Amber 400 */
    background: rgba(251, 191, 36, 0.15);
    transform: scale(1.1);
}

.fav-star.favorited {
    color: #f59e0b;
    /* Amber 500 */
    background: rgba(245, 158, 11, 0.2);
}

.fav-star:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

.comedian {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 0.45rem 0.85rem;
    margin: 0.25rem 0.25rem 0.35rem 0;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    min-height: 2rem;
    line-height: 1;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    box-shadow: inset 0 0 0 1px var(--border-color);
    box-sizing: border-box;
    background-clip: padding-box;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comedian:hover {
    background: var(--hover-bg);
    box-shadow: inset 0 0 0 1.5px var(--accent-color);
    color: var(--text-light);
}

/* Clickable comedian badges (with website) */
a.comedian {
    text-decoration: none;
    cursor: pointer;
}

a.comedian:hover {
    background: #d5d5eb;
    box-shadow: inset 0 0 0 1.5px var(--accent);
    transform: translateY(-1px);
}

a.comedian:active {
    transform: translateY(0);
}

/* Celebrity pseudonym styling */
.comedian.celebrity-pseudonym {
    background: #f0f0f7;
    box-shadow: inset 0 0 0 1px #d4af37;
}

.comedian.celebrity-pseudonym:hover {
    background: #e9e9f5;
    box-shadow: inset 0 0 0 1px #ffd700;
}

/* Special Show Styling */
.special-show {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 179, 71, 0.3));
    color: var(--text-light);
    padding: 0.5rem 1rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    border-radius: 16px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 215, 0, 0.5);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.special-show:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 179, 71, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.7);
}

/* Comedian Tooltips */
.comedian-tooltip {
    position: fixed;
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 300px;
    word-wrap: break-word;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-5px);
    transition: all 0.2s ease;
    visibility: hidden;
}

.comedian-tooltip.visible {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(0);
    visibility: visible;
}

.comedian-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--secondary-color);
    margin-top: -1px;
}

/* Tooltip arrow for bottom positioning */
.comedian-tooltip[data-position="below"]::after {
    top: -5px;
    border-top-color: transparent;
    border-bottom-color: var(--secondary-color);
    margin-top: 0;
}

.reservation-btn {
    background: var(--success-color);
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.reservation-btn:hover {
    background: #22c55e;
    transform: translateY(-2px);
    color: var(--primary-color);
    text-decoration: none;
}

/* Action buttons side-by-side */
.actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.reservation-btn.alt {
    background: var(--accent-color);
    color: #1a1b26;
}

.reservation-btn.alt:hover {
    background: #34d399;
    /* Emerald 400 */
}

@media (max-width: 480px) {
    .actions-row {
        grid-template-columns: 1fr;
    }

    .reservation-btn {
        min-height: 44px;
        font-size: 0.95rem;
    }
}

/* [REMOVED] Duplicate .show-title definition */

/* No Shows State */
.no-shows {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
}

.no-shows i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-shows h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.no-shows p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    border-top: 1px solid var(--accent-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.support-button {
    margin: 0.5rem auto;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    text-decoration: underline;
}

/* Date Sections */
.date-section {
    margin-bottom: 2rem;
}

.date-header {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    font-weight: 800;
    color: var(--fg);
    margin: 2rem 0 1rem 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(92, 69, 128, 0.08), rgba(92, 69, 128, 0.02));
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}

/* Minimal list: date breaks between days */
.list .date-break {
    list-style: none;
    margin: 1.5rem 0 0.5rem;
}

.date-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0 1rem 0;
    background: linear-gradient(135deg, rgba(92, 69, 128, 0.08), rgba(92, 69, 128, 0.02));
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}

.date-divider .wd {
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.date-divider .md {
    color: var(--text-light);
    font-weight: 800;
    font-size: 1.15rem;
}

/* Improve readability on the minimal (light) page */
body.minimal .date-divider {
    border-bottom-color: #e72c6b;
    /* ensure visible on white */
}

body.minimal .date-divider .wd {
    color: #4a4a4a;
    /* slate-600 */
}

body.minimal .date-divider .md {
    color: #050a05;
    /* slate-900 */
}

/* Skeleton loading styles */
.skeleton-card {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    margin-bottom: 1rem;
    overflow: hidden;
}

.skeleton-time {
    width: 72px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    animation: shimmer 1.4s infinite;
}

.skeleton-main {
    width: 100%;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    margin: 8px 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    animation: shimmer 1.4s infinite;
}

.skeleton-line.w-60 {
    width: 60%;
}

.skeleton-line.w-90 {
    width: 90%;
}

.skeleton-chip-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.skeleton-chip {
    width: 72px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    animation: shimmer 1.4s infinite;
}

.skeleton-ctas {
    display: flex;
    gap: 8px;
    align-items: center;
}

.skeleton-pill {
    width: 36px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    animation: shimmer 1.4s infinite;
}

.skeleton-btn {
    width: 80px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -120px 0;
    }

    100% {
        background-position: 120px 0;
    }
}

/* Light mode skeletons */
body.minimal .skeleton-card {
    background: #f8fafc;
    border-color: #e5e7eb;
}

body.minimal .skeleton-time,
body.minimal .skeleton-line,
body.minimal .skeleton-chip,
body.minimal .skeleton-pill,
body.minimal .skeleton-btn {
    background: linear-gradient(90deg, #e5e7eb, #f1f5f9, #e5e7eb);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .search-group {
        min-width: auto;
    }

    .search-group input {
        width: 100%;
    }

    .filter-group select {
        min-width: auto;
        width: 100%;
    }

    .stats-section {
        margin-bottom: 1.5rem;
    }

    .stats-header {
        padding: 0 1rem;
        margin-bottom: 0.75rem;
    }

    .stats-title {
        font-size: 1.1rem;
    }

    .stats-content {
        max-height: none;
    }

    /* Allow natural height on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-item {
        padding: 1rem 0.75rem;
    }

    .shows-grid {
        grid-template-columns: 1fr;
    }

    .show-card {
        scroll-snap-align: start;
    }

    .show-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .show-card {
        padding: 1rem;
    }

    .comedians-list {
        margin-bottom: 1rem;
    }

    .refresh-btn {
        width: 48px;
        height: 48px;
    }
}

/* Ultra-narrow viewports fixes */
/* Responsive adjustments for header */
@media (min-width: 900px) {

    /* Side-by-side layout only on truly wide screens */
    .header-inner {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .minimal h1 {
        margin: 0;
        flex: 0 0 auto;
        text-align: left;
    }

    .header-controls {
        flex: 1 1 auto;
        max-width: 640px;
    }
}

@media (max-width: 480px) {
    .minimal h1 {
        font-size: clamp(20px, 5vw, 26px);
    }

    .header-inner {
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .filters {
        padding: 0.5rem 0;
    }

    .filter-bar {
        padding: 0 0.5rem;
        gap: 0.25rem;
    }

    .filters-toggle {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        min-height: 32px;
    }

    .filters-toggle svg {
        width: 14px;
        height: 14px;
    }

    .main-content {
        padding: 0.75rem;
    }

    .shows-grid {
        grid-template-columns: 1fr;
    }

    .show-card {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .show-header {
        padding-right: 22px;
    }

    .show-time {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    .show-location {
        font-size: 0.85rem;
    }

    .reservation-btn {
        min-height: 44px;
        font-size: 0.9rem;
    }

    .date-header {
        font-size: 1rem;
    }

    input,
    select,
    button {
        font-size: 1rem;
    }

    /* Even more compact mobile panel for small phones */
    .filters-panel {
        max-height: 55vh;
        padding: 0.375rem 0.5rem 0.5rem 0.5rem;
    }

    .filters-panel .panel-row {
        gap: 0.375rem;
    }

    .filters-panel .search-group input,
    .filters-panel .filter-group select {
        padding: 0.5rem 0.625rem;
        font-size: 0.85rem;
    }

    .filters-panel .refresh-btn {
        width: 40px;
        height: 40px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .filters {
        padding: 0.375rem 0;
    }

    .filter-header {
        padding: 0.5rem 0.5rem 0.25rem 0.5rem;
    }

    .filter-bar {
        padding: 0 0.375rem;
    }

    .main-content {
        padding: 0.5rem;
    }

    .stats-section {
        margin-bottom: 1rem;
    }

    .stats-header {
        padding: 0 0.5rem;
        margin-bottom: 0.5rem;
    }

    .stats-title {
        font-size: 1rem;
    }

    .stats-grid {
        gap: 0.5rem;
    }

    .stat-item {
        padding: 0.75rem 0.5rem;
    }

    .show-card {
        padding: 0.625rem;
    }

    .comedian {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .reservation-btn {
        min-height: 40px;
        font-size: 0.85rem;
    }
}

/* Modal styles for mobile bio */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: min(90vw, 520px);
    max-height: 80vh;
    overflow: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    cursor: pointer;
}

.modal-body {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

    .filter-bar {
        padding: 0 1rem;
    }

    .show-time {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .comedian {
        font-size: 0.85rem;
        padding: 0.4rem 0.7rem;
    }

    .comedian-tooltip {
        max-width: 250px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .reservation-btn {
        min-height: 44px;
        /* a11y tap target */
        font-size: 0.95rem;
    }
}

/* Very large displays: wider columns for readability */
@media (min-width: 1400px) {
    .main-content {
        max-width: 1400px;
    }

    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation only */
.comedian:focus-visible,
.show-card:focus-visible,
.reservation-btn:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .show-card {
        border: 2px solid #000;
    }

    .comedian {
        border: 1px solid #000;
    }

    .reservation-btn {
        border: 2px solid #000;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* (Removed duplicate tooltip styles - using the primary definition above) */

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error states */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Success states */
.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Virtual scrolling container */
.virtual-scroll-container {
    height: 100%;
    overflow: auto;
}

/* Keep the filter bar visible as users scroll the long list */
main {
    position: relative;
    overflow: visible;
}

.virtual-item {
    position: absolute;
    width: 100%;
}

/* PWA specific styles */
@media (display-mode: standalone) {
    .header {
        padding-top: env(safe-area-inset-top);
    }

    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Orion Browser Safe Area Covers */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--primary-color);
    z-index: 9999;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom, 0px);
    background: var(--primary-color);
    z-index: 9999;
    pointer-events: none;
}

body.dark-mode::before,
body.dark-mode::after {
    background: var(--primary-color);
    /* #1e1e1e in dark mode */
}

/* Ensure safe area covers are above everything but don't interfere */
body::before,
body::after {
    display: block !important;
}

/* Additional fallback for extreme safe areas */
@media (max-width: 640px) {

    body::before,
    body::after {
        /* Ensure minimum height doesn't cause issues */
        min-height: 0;
    }
}


/* Important Message Icon */
.important-message-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #007bff;
    cursor: help;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.important-message-icon:hover {
    opacity: 1;
    color: #0056b3;
}

.important-message-icon i {
    font-size: 16px;
}

/* Show header positioning for icon */
.show-header {
    position: relative;
    padding-right: 30px;
    /* Make room for the icon */
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-row {
        flex-direction: column;
    }

    .footer-col {
        width: 100%;
        text-align: center;
    }

    .support-button {
        margin-top: 1rem;
    }
}

/* Accessible color system and typography */
:root {
    --bg: #F5F5F5;
    /* editor.background */
    --fg: #0f172a;
    /* default foreground (stronger for readability) */
    --muted: #595959;
    /* Darker for WCAG AA (4.74:1) on light bg */
    --border: #e0e0e0;
    /* list.hoverBackground as border */
    --accent: #5c4580;
    /* Darker purple for better contrast (4.7:1 with white) */
}

/* Explicit theme overrides via JS-applied classes */
/* (reverted) explicit theme classes removed */

/* Minimal homepage overrides */
.minimal {
    background: var(--bg);
    color: var(--fg);
    height: 100dvh;
    overflow: hidden;
    /* Prevent body scroll - main will be the scroll container */
    display: block;
    /* Remove grid - fixed elements don't participate */
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
}

.minimal a {
    color: var(--accent);
    text-decoration: none;
}

.minimal a:hover {
    text-decoration: underline;
}

.minimal header {
    position: fixed;
    top: calc(-1 * env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    z-index: 1000;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 12px;
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--primary-color), transparent 15%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

/* Solid cover for the safe-area/notch region above header content */
.minimal header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--primary-color);
    z-index: 1;
}

.minimal .header-inner {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "title controls";
    align-items: center;
    gap: clamp(6px, 1.5vw, 16px);
}

.minimal .header-title-group {
    grid-area: title;
    display: flex;
    align-items: center;
    gap: 12px;
}

.minimal h1 {
    margin: 0;
    font-size: clamp(22px, 3.4vw, 32px);
    letter-spacing: -0.2px;
    line-height: 1.1;
    text-align: left;
}

.minimal .header-controls {
    grid-area: controls;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1vw, 10px);
}

.minimal .header-controls .row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 1vw, 10px);
    align-items: stretch;
}

.minimal .header-controls input,
.minimal .header-controls select,
.minimal .header-controls button {
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--control-bg);
    color: var(--fg);
    font-size: 14px;
}

.minimal .header-controls #filter-search {
    flex-basis: 100%;
}

.minimal .header-controls input {
    padding: 0 12px;
}

.minimal .header-controls button {
    padding: 0 10px;
}

/* Icon button controls - centered icons */
.minimal #favorites-btn,
.minimal #theme-toggle,
.minimal #calendar-toggle {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Date filter wrapper is a flex container itself */
/* Date filter wrapper is a flex container with shared background */
.minimal .date-filter-wrapper {
    display: flex;
    gap: 0 !important;
    flex: 1 1 140px;
    min-width: 140px;
    background: var(--control-bg, #ebebeb) !important;
    /* Unified background */
    border-radius: 20px !important;
    /* Pill shape for container */
    align-items: center !important;
}

.minimal .date-filter-wrapper select {
    flex: 1 1 auto;
    min-width: 110px;
    /* Prevent truncation of 'All dates' */
    height: 40px !important;
    border: none !important;
    background: transparent !important;
    /* Transparent to show wrapper bg */
    border-radius: 20px 0 0 20px !important;
    /* For focus ring shape */
    padding-left: 16px !important;
    z-index: 1;
}

.minimal .date-filter-wrapper button {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    background: transparent !important;
    /* Transparent to show wrapper bg */
    border: none !important;
    margin: 0 !important;
    border-radius: 0 20px 20px 0 !important;
    /* Right side rounded */
}

/* Selects grow to fill space */
.minimal #filter-location,
.minimal #filter-data-source {
    flex: 1 1 140px;
    min-width: 120px;
}

.minimal .header-controls select {
    padding: 0 36px 0 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c6c6c' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

/* Search spans full width on its own row */
.minimal #filter-search {
    width: 100%;
    flex: 1 1 100%;
}

.minimal .header-controls input::placeholder {
    color: var(--muted);
}

.minimal .header-controls input:focus-visible,
.minimal .header-controls select:focus-visible,
.minimal .header-controls button:focus-visible,
.btn:focus-visible {
    outline: none;
    /* Remove default outline */
}

.minimal #favorites-btn,
.minimal #theme-toggle,
.minimal #calendar-toggle {
    background: transparent;
    border: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
    color: var(--fg);
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Always circular */
    cursor: pointer;
}

.minimal #favorites-btn:hover,
.minimal #theme-toggle:hover,
.minimal #calendar-toggle:hover {
    background: rgba(128, 128, 128, 0.15);
    /* Subtle circular highlight */
}

.minimal #favorites-btn:focus,
.minimal #theme-toggle:focus,
.minimal #calendar-toggle:focus {
    background: rgba(128, 128, 128, 0.1);
    /* Lighter focus highlight */
    outline: none;
}

.minimal #favorites-btn.active,
.minimal #theme-toggle.active,
.minimal #calendar-toggle.active {
    /* Active state remains circular */
}

.minimal #favorites-btn.active {
    background: var(--accent);
    color: #ffffff;
}

.minimal #favorites-btn.active svg {
    fill: currentColor;
}

/* Retain legacy .controls styles if used elsewhere */
.controls {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.controls .row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.controls input,
.controls select {
    background: var(--card-bg);
    color: var(--fg);
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
}

.controls input::placeholder {
    color: var(--muted);
}

.controls input:focus-visible,
.controls select:focus-visible,
.btn:focus-visible {
    outline: 3px solid color-mix(in oklab, var(--accent), white 30%);
    outline-offset: 2px;
}

.error {
    color: #b42318;
    background: #ffefef;
    border: 1px solid #f3d2cf;
    padding: 10px 12px;
    margin: 12px 16px;
    border-radius: 10px;
}

.list {
    list-style: none;
    padding: 16px max(env(safe-area-inset-left, 16px), 16px) 56px max(env(safe-area-inset-right, 16px), 16px);
    margin: 0;
}

.show {
    display: grid;
    grid-template-columns: 80px 1fr minmax(120px, auto);
    gap: 16px;
    padding: 20px;
    margin-bottom: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    align-items: center;
    contain: content;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.show:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--action-color);
    /* Emerald instead of purple */
}

/* .show-time base styles consolidated in Layout & Aesthetic Refinements section */

.show-venue {
    font-weight: 700;
    overflow-wrap: break-word;
    word-break: break-word;
}

.show-series {
    color: var(--muted);
    font-style: italic;
    margin-top: 2px;
}

.show-title {
    background: none;
    border: none;
    border-left: 3px solid var(--info-fg);
    /* Blue Accent Bar */
    color: var(--info-fg);
    padding: 2px 0 2px 12px;
    /* Left indent */
    border-radius: 0;
    margin-top: 6px;
    margin-bottom: 4px;
    /* Ensure spacing below */
    font-weight: 700;
    font-size: 1.1rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Important notes */
/* Important notes - retained but subtle */
/* Important notes - Accent Bar Variant */
.show-note.important {
    background: rgba(251, 191, 36, 0.05);
    /* Extremely subtle tint */
    border: none;
    border-left: 3px solid var(--warning-fg);
    /* Yellow Accent Bar */
    color: var(--warning-fg);
    padding: 4px 12px 4px 12px;
    border-radius: 0 4px 4px 0;
    font-style: normal;
    padding-right: 0;
}


/* Matches spacing */
}

.show-comedians {
    color: var(--fg);
    /* More distinct artist names */
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}

.show-comedians.no-lineup {
    color: var(--muted);
    font-weight: 400;
}

.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    background: var(--secondary-color);
    color: var(--text-muted);
    border: none;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.8;
}

/* Badges in time column - stack vertically */
.show-time .badge {
    display: block;
    margin: 4px 0 0 0;
    text-align: center;
    font-size: 9px;
    padding: 2px 6px;
}

/* Available badge - subtle muted green */
.badge.available {
    background: rgba(16, 185, 129, 0.12);
    color: #6b9080;
    border: none;
}

.badge.mint {
    background: var(--success-bg);
    color: var(--success-fg);
    border: none;
    opacity: 0.7;
}

.badge.almost {
    background: rgba(251, 191, 36, 0.12);
    color: #a88a3d;
    border: none;
}

.badge.sold-out {
    background: rgba(239, 68, 68, 0.12);
    color: #b56565;
    border: none;
}


.badge.holiday {
    background: var(--danger-bg);
    color: var(--danger-fg);
    border-color: var(--danger-fg);
}

.price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--control-bg);
    color: var(--text-light);
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--border-color);
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: color-mix(in srgb, var(--action-color), #888 25%);
    /* Muted version of theme action color */
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}

.btn:link,
.btn:visited {
    color: #fff !important;
}

.btn:hover {
    background: color-mix(in srgb, var(--action-hover), #888 20%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn:focus-visible {
    outline: 3px solid var(--action-color);
    outline-offset: 2px;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
}

.btn-secondary:hover {
    background: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}

.empty {
    color: var(--muted);
    padding: 24px 0;
    text-align: center;
}

.footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    background: var(--bg);
}

/* Minimal footer overrides for readability */
.minimal .footer {
    position: fixed;
    left: 0;
    right: 0;
    /* Extend footer to cover safe area (home indicator) */
    bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
    z-index: 40;
    background: var(--bg);
    color: var(--fg);
    border-top: 1px solid var(--border);
    padding: 12px max(env(safe-area-inset-right, 16px), 16px) calc(env(safe-area-inset-bottom, 0px) + 12px) max(env(safe-area-inset-left, 16px), 16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, .02);
}

/* Solid cover for the bottom safe-area/home indicator region */
.minimal .footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom, 0px);
    background: var(--bg);
    z-index: 1;
}

.minimal .footer a {
    color: #0b62ff;
    text-decoration: none;
    font-weight: 600;
}

.minimal .footer a:hover {
    text-decoration: underline;
}

/* Do not underline the Buy Me a Coffee button on hover */
.minimal .footer a.bmc-btn:hover {
    text-decoration: none;
}

/* (reverted) theme toggle styles removed */

/* Buy Me a Coffee button - Pale Yellow */
.bmc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5e6a3 !important;
    /* Pale yellow */
    color: #5a4a2a !important;
    /* Dark brown text */
    border: none !important;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 700;
}

.bmc-btn:hover {
    background: #edd98b !important;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(245, 230, 163, 0.5);
}

/* Filter toggle and header icons base styling */
.filter-toggle,
.favorites-btn,
.theme-toggle {
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--fg);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    transition: var(--transition);
}

.filter-toggle:focus,
.favorites-btn:focus,
.theme-toggle:focus,
.filter-toggle:active,
.favorites-btn:active,
.theme-toggle:active {
    outline: none !important;
    box-shadow: none !important;
}

.filter-toggle:hover,
.favorites-btn:hover,
.theme-toggle:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
}

.filter-toggle.active {
    color: var(--accent-color);
    background: var(--control-bg);
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Tooltip for comedian bios */
.tooltip {
    position: fixed;
    max-width: 200px;
    background: #111827;
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    z-index: 9999;
    pointer-events: auto;
    line-height: 1.35;
}

/* Tooltip button row - Visit Website + Favorite side by side */
.tooltip-btn-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    clear: both;
}

.tooltip a.tooltip-btn,
.tooltip .tooltip-fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: var(--accent-color);
    color: #fff;
    text-align: center;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 10px;
    border: none;
    cursor: pointer;
    line-height: 1.2;
}

.tooltip .tooltip-fav-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #f9fafb;
}

.tooltip .tooltip-fav-btn.favorited {
    background: #f59e0b;
    color: #fff;
}

.tooltip a.tooltip-btn:hover,
.tooltip .tooltip-fav-btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

.tooltip.hidden {
    display: none;
}

.comedian {
    text-decoration: none;
    border-bottom: 0;
    cursor: help;
}

/* Responsive header layout - tablet */
@media (max-width: 899px) {
    .minimal .header-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "controls";
        margin: 0 auto;
    }

    .minimal .header-controls .row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px;
    }

    .minimal .date-filter-wrapper,
    .minimal #filter-search {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    /* Location and Shows dropdowns on same row */
    .minimal #filter-location,
    .minimal #filter-data-source {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        max-width: calc(50% - 4px);
    }
}




@media (max-width: 640px) {
    .minimal header {
        padding: calc(env(safe-area-inset-top, 0px) + 4px) 10px 8px;
    }

    .minimal .header-inner {
        position: relative;
        grid-template-columns: 1fr;
        grid-template-areas:
            "title-group"
            "controls";
        gap: 8px;
        padding-bottom: 8px;
    }

    .minimal .header-title-group {
        grid-area: title-group;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 4px;
    }

    .minimal h1 {
        font-size: 16px;
        text-align: left;
        padding: 0;
        margin: 0;
    }

    .minimal .header-icons {
        display: flex;
        gap: 8px;
    }

    .minimal .header-controls {
        grid-area: controls;
        gap: 4px;
    }

    /* Icons styling inside header-icons - now handled by base styles */
    .minimal .header-icons button {
        height: 32px;
        /* Keep size adjustment if needed, or remove if 44px is fine */
        width: 32px;
    }

    .minimal .header-controls #theme-toggle {
        right: 16px;
    }

    .minimal .header-controls #favorites-btn {
        right: 56px;
    }

    /* 2-row Grid for Filters */
    /* Flexible layout for smaller screens */
    .minimal .header-controls .row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px;
    }

    .minimal .date-filter-wrapper {
        grid-area: date;
        margin: 0;
        display: flex;
    }

    .minimal #filter-location {
        grid-area: location;
        margin: 0;
    }

    .minimal #filter-data-source {
        grid-area: source;
        margin: 0;
    }

    .minimal #filter-search {
        grid-area: search;
        margin: 0;
        flex-basis: auto;
    }

    justify-content: stretch;
}

.minimal .header-controls input,
.minimal .header-controls select,
.minimal .header-controls button {
    height: 36px;
    font-size: 14px;
}

/* Closing existing media query safely */
}

/* Base Styles for Show List (Desktop) */
.show {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-areas:
        "time main"
        "ctas main";
    align-items: start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.show-time {
    grid-area: time;
    padding: 6px 12px;
}

.show-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.show-ctas {
    grid-area: ctas;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    margin-top: 4px;
}

.primary-ctas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

/* Consistent Header Icons */
.minimal .header-icons {
    display: flex;
    flex-direction: row !important;
    gap: 8px;
}

/* Mobile Layout Overrides */
@media (max-width: 640px) {

    /* Fix Mobile Filters Ordering */
    .minimal #filter-search {
        order: 4;
        /* Search at bottom */
    }

    .list {
        padding: 0 12px 72px;
    }

    /* Show layout is now handled by base styles */

    .price {
        margin-right: 0;
        margin-bottom: 0;
        font-size: 0.75rem;
        min-width: auto;
        justify-content: center;
        width: 100%;
        padding: 2px 4px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 6px 4px;
        font-size: 0.8rem;
        min-height: 32px;
    }

    .secondary-ctas {
        width: 100%;
    }

    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 6px 4px;
        font-size: 0.8rem;
        min-height: 32px;
    }


    .price {
        margin-right: 0;
        margin-bottom: 0;
        font-size: 0.75rem;
        min-width: auto;
        justify-content: center;
        width: 100%;
        padding: 2px 4px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 6px 4px;
        font-size: 0.8rem;
        min-height: 32px;
    }

    .secondary-ctas {
        width: 100%;
    }

    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 6px 4px;
        font-size: 0.8rem;
        min-height: 32px;
    }
}



.show-comedians {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}

/* Constrain layout width for consistent readability */
.minimal #error,
.minimal main,
.minimal .footer {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

/* Header controls layout (mirrors .controls) */
.header-controls {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    padding-top: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 500px;
    /* Large enough to fit content */
    opacity: 1;
    overflow: hidden;
}

.header-controls.collapsed {
    max-height: 0;
    padding-top: 0;
    opacity: 0;
    margin-top: -8px;
    /* Offset gap */
    pointer-events: none;
}

.header-controls .row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.header-controls input,
.header-controls select {
    background: #ffffff;
    color: var(--fg);
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
}

.header-controls input::placeholder {
    color: var(--muted);
}

/* Toggle filter row */
.toggle-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* Hide default checkbox */
.toggle-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Toggle switch styling */
.toggle-label {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--fg);
    padding-left: 50px;
    margin: 0;
}

.toggle-label::before {
    content: '';
    position: absolute;
    left: 0;
    width: 42px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.toggle-label::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
}

.toggle-checkbox:checked+.toggle-label::before {
    background: var(--accent);
}

.toggle-checkbox:checked+.toggle-label::after {
    left: 21px;
}

.toggle-checkbox:focus+.toggle-label::before {
    outline: 3px solid color-mix(in oklab, var(--accent), white 30%);
    outline-offset: 2px;
}

/* Compact toggle for search row */
.toggle-filter-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
}

/* Adjust search+toggle row layout */
.search-toggle-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-toggle-row #filter-search {
    flex: 1;
    min-width: 0;
}

/* Make toggle label more compact */
.toggle-filter-compact .toggle-label {
    font-size: 0.85rem;
    padding-left: 46px;
}

.toggle-filter-compact .toggle-label::before {
    width: 38px;
    height: 22px;
}

.toggle-filter-compact .toggle-label::after {
    width: 16px;
    height: 16px;
    left: 3px;
}

.toggle-filter-compact .toggle-checkbox:checked+.toggle-label::after {
    left: 19px;
}

/* Ensure CTA container lays out price + button nicely */


/* ============================================
   ACCESSIBILITY: Focus Indicators & Touch Targets
   ============================================ */

/* Universal focus indicator for all interactive elements */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5c4580;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(92, 69, 128, 0.1);
}

/* Ensure button focus is visible - only for keyboard navigation */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #5c4580;
    outline-offset: 2px;
}

/* Remove mouse-click focus outlines */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
select:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* Calendar days keyboard navigation */
.calendar-day:focus-visible {
    outline: 2px solid #5c4580;
    outline-offset: 1px;
    border-radius: 4px;
}

/* Dropdown items */
.autocomplete-item:focus-visible {
    outline: 2px solid #5c4580;
    outline-offset: 0;
}

/* MOBILE: Ensure minimum touch target sizes (44×44px per WCAG) */
@media (max-width: 768px) {
    button {
        min-height: 44px;
        min-width: 44px;
    }

    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    select,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }

    .calendar-day {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *:focus-visible {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   MOBILE: Scroll-to-Top Button
   ============================================ */

.scroll-to-top {
    position: fixed;
    /* Position above the footer - use fallback of 60px for footer height */
    bottom: calc(env(safe-area-inset-bottom, 0px) + 60px + 16px);
    right: max(20px, env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    border: none;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background: #5a3d7a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Comedian chips container: Flexible wrapping list (Flexbox > Grid for variable text) */
.show-comedians {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
    /* Reduced gap slightly for tighter packing */
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    padding: 8px 0 !important;
    width: 100% !important;
}

.comedian-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 1 auto !important;
    width: auto !important;
    /* Force auto width to prevent truncation */
    max-width: 100% !important;
    /* Ensure it doesn't overflow container */
    /* Allow natural sizing but wrap evenly */
}

/* Comedian chips redesign */
.comedian {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--fg) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: var(--transition) !important;
}

body.dark-mode .comedian {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.comedian:hover {
    background: var(--hover-bg) !important;
    border-color: var(--accent) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.comedian-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 2px 0;
}

.fav-star {
    font-size: 16px !important;
    opacity: 0.3;
    transition: var(--transition);
}

.fav-star:hover,
.fav-star.favorited {
    opacity: 1;
    transform: scale(1.1);
}

.scroll-to-top:focus-visible {
    outline: 2px solid #5c4580;
    outline-offset: 2px;
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top.hidden {
    display: flex !important;
    /* Override global .hidden { display: none } */
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* ============================================
   Pull-to-Refresh
   ============================================ */

.pull-refresh {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 14px;
}

.pull-refresh.visible {
    opacity: 1;
}

.pull-refresh.refreshing .pull-refresh-text {
    display: none;
}

.pull-refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.pull-refresh.refreshing .pull-refresh-spinner {
    opacity: 1;
    animation: ptr-spin 0.8s linear infinite;
}

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

main {
    position: relative;
    overflow: visible;
}

/* ============================================
   Dark Mode Readability Fixes
   ============================================ */

/* Fix show card titles (inputs) - was white text on white bg */
body.dark-mode .show-title {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Fix badges in dark mode */
body.dark-mode .badge {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #e4e4e7 !important;
}

body.dark-mode .badge.available {
    background-color: rgba(52, 211, 153, 0.2) !important;
    border-color: #34d399 !important;
    color: #6ee7b7 !important;
    /* Emerald 300 */
}

body.dark-mode .badge.mint {
    background-color: rgba(74, 222, 128, 0.2) !important;
    border-color: #4ade80 !important;
    color: #4ade80 !important;
}

body.dark-mode .badge.almost {
    background-color: rgba(251, 191, 36, 0.2) !important;
    border-color: #fbbf24 !important;
    color: #fbbf24 !important;
}

body.dark-mode .badge.sold-out {
    background: #c7444a !important;
    /* Solid Monokai Red */
    color: #f8f8f2 !important;
    border-color: #c7444a !important;
}

body.dark-mode .badge.holiday {
    background-color: rgba(248, 113, 113, 0.2) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
}

/* Fix show notes - was blue text on light blue bg */
body.dark-mode .show-note,
body.dark-mode .show-note.important {
    background-color: rgba(60, 100, 255, 0.15) !important;
    border-color: rgba(60, 100, 255, 0.25) !important;
    color: #e0e7ff !important;
}

/* Fix header inputs and selects - was low contrast */
body.dark-mode .header-controls input,
body.dark-mode .header-controls select,
body.dark-mode #filter-search {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

body.dark-mode .header-controls input::placeholder,
body.dark-mode #filter-search::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix date filter wrapper - match dropdown styling */
body.dark-mode .date-filter-wrapper {
    background-color: var(--control-bg) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode .date-filter-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

/* Fix price tags - was dark text on light bg, needed better integration */
body.dark-mode .price {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Fix header buttons - make transparent in dark mode */
body.dark-mode .favorites-btn,
body.dark-mode .filter-toggle,
body.dark-mode .theme-toggle,
body.dark-mode #calendar-toggle,
body.dark-mode #favorites-btn,
body.dark-mode #theme-toggle {
    background-color: transparent;
    border-color: transparent;
    color: var(--fg);
}

body.dark-mode .favorites-btn:hover,
body.dark-mode .filter-toggle:hover,
body.dark-mode .theme-toggle:hover,
body.dark-mode #calendar-toggle:hover,
body.dark-mode #favorites-btn:hover,
body.dark-mode #theme-toggle:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent);
    color: #ffffff;
}

/* Ensure active states remain visible */
body.dark-mode .favorites-btn.active,
body.dark-mode .filter-toggle.active,
body.dark-mode #favorites-btn.active {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
}

/* Fix calendar popup in dark mode */
body.dark-mode .calendar-popup {
    background-color: var(--card-bg) !important;
    border-color: var(--border) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .calendar-month-year {
    color: #ffffff !important;
}

body.dark-mode .calendar-header button {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .calendar-header button:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .calendar-day:not(.disabled):not(.empty):hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .calendar-day.selected {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}

/* Fix comedian chips in dark mode */
body.dark-mode .comedian {
    background-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
    color: #e4e4e7 !important;
}

body.dark-mode .comedian:hover {
    background-color: rgba(52, 211, 153, 0.15) !important;
    box-shadow: inset 0 0 0 1.5px #34d399 !important;
    color: #ffffff !important;
}

/* Fix linked comedian names in dark mode */
body.dark-mode a.comedian {
    color: var(--accent-color) !important;
}

body.dark-mode a.comedian:hover {
    box-shadow: inset 0 0 0 1.5px var(--accent-color) !important;
    background: var(--secondary-color) !important;
}

/* Fix celebrity pseudonyms in dark mode */
body.dark-mode .comedian.celebrity-pseudonym {
    box-shadow: inset 0 0 0 1px #fbbf24 !important;
}

/* Fix favorited comedian wrapper in dark mode */
body.dark-mode .comedian-wrapper.favorited .comedian {
    background-color: rgba(251, 191, 36, 0.15) !important;
    box-shadow: inset 0 0 0 1px #fbbf24 !important;
}

/* Fix date headers in dark mode - overriding body.minimal styles */
body.dark-mode .date-divider .wd {
    color: #a1a1aa !important;
    /* Zinc-400 */
}

body.dark-mode .date-divider .md {
    color: #ffffff !important;
    /* White */
}

body.dark-mode .date-header {
    color: #ffffff !important;
}

/* ============================================
   Safari & iOS Specific Optimizations
   ============================================ */

/* Remove default gray tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Fix rounded corners on search inputs in Safari */
input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    /* Ensure our border-radius wins */
}

/* Prevent unwanted font resizing on orientation change */
html {
    -webkit-text-size-adjust: 100%;
}

/* Fix calendar date contrast in dark mode */
body.dark-mode .calendar-day {
    color: #ffffff !important;
    /* Default text color for enabled dates */
}

body.dark-mode .calendar-day.disabled {
    color: rgba(255, 255, 255, 0.2) !important;
    /* Muted text for disabled dates */
    cursor: not-allowed;
}

body.dark-mode .calendar-day.today {
    border-color: var(--accent) !important;
}

/* Ensure selected state is visible */
body.dark-mode .calendar-day.selected {
    background-color: var(--accent) !important;
    color: #ffffff !important;
    font-weight: 700;
}

/* ============================================
   Layout & Aesthetic Refinements
   ============================================ */

/* 2. Consolidated Show Time Badge Styles */
.show-time {
    background: #768390 !important;
    /* Muted Slate (Distinct from button) */
    color: #fff !important;
    font-variant-numeric: tabular-nums;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    min-width: 80px;
    text-align: center;
    font-weight: 700;
    box-shadow: none !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    flex-shrink: 0;
}

/* Monokai Dimmed theme override for time badge */
body.dark-mode .show-time {
    background: #75715E !important;
    /* Monokai Dimmed Comment */
}

.show-time .t {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: #fff !important;
}

.show-time .d {
    font-size: 0.75rem !important;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin-top: 2px;
}

.time-period {
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
    margin-top: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    backdrop-filter: blur(4px);
}

/* Override existing time-period colors to unify the look */
.time-period.afternoon {
    background: rgba(238, 155, 0, 0.25) !important;
}

.time-period.evening {
    background: rgba(30, 64, 175, 0.4) !important;
}

.time-period.late-night {
    background: rgba(107, 33, 168, 0.4) !important;
}

/* Increase max-width to allow more breathing room for filters */
.main-content {
    max-width: 1600px !important;
}

/* Ensure scrolling works on the entire page on desktop */
@media (min-width: 1024px) {

    html,
    body {
        overflow-y: auto !important;
        /* Enable vertical scrolling on body */
        height: auto !important;
        /* Remove fixed height constraint */
    }

    main {
        position: relative !important;
        /* Let main flow naturally */
        top: auto !important;
        bottom: auto !important;
        height: auto !important;
        overflow: visible !important;
        /* Remove internal scroll */
    }

    /* Keep minimal layout fixed; allow sticky header elsewhere */
    body:not(.minimal) header {
        position: sticky !important;
        top: 0 !important;
    }
}

/* Ensure main respects the dynamic padding */
main {
    box-sizing: border-box;
    /* Default padding before JS loads to prevent total collapse */
    padding-top: 140px;
}

/* Automagic Padding Logic */
:root {
    /* Default fallback if JS hasn't run yet */
    --header-height-dynamic: 140px;
}

.minimal main {
    /* Always use the dynamic height + buffer */
    padding-top: calc(var(--header-height-dynamic) + 16px) !important;
    transition: padding-top 0.1s ease-out;
    /* Smooth adjustment if header resizes */
}

/* Ensure body doesn't add conflicting padding */
body {
    padding-top: 0 !important;
}

/* ============================================
   INTELLIGENT DYNAMIC LAYOUT & SCROLLING
   ============================================ */

/* 1. Global Scrolling: standard behavior on all devices */
html,
body {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* 2. Consistent Container Widths */
body:not(.minimal) .header-inner,
.main-content,
.footer-content {
    max-width: 1600px !important;
    margin: 0 auto !important;
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
}

/* =========================================
   Show List Layout Overrides (Definitive Fix)
   ========================================= */

.minimal .show {
    display: grid !important;
    grid-template-columns: 120px 1fr 120px !important;
    /* 3 Columns: Time | Main | CTAs */
    grid-template-rows: auto !important;
    grid-template-areas:
        "time main ctas" !important;
    align-items: start !important;
    gap: 16px 20px !important;
    padding: 20px !important;
    /* Symmetrical padding (20px all around) */
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    transition: var(--transition);
}

.minimal .show:hover {
    box-shadow: inset 0 0 0 1px var(--accent-color) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

body.dark-mode .minimal .show:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Darken stars on card hover for better visibility */
.minimal .show:hover .fav-star:not(:hover):not(.favorited) {
    color: #6b7280;
    /* Gray 500 */
}

@media (max-width: 768px) {

    /* Mobile adjustments for accent bars */
    .show-title,
    .show-note,
    .show-note.important {
        padding-right: 0 !important;
        /* Reset any legacy padding */
    }
}

.minimal .show-time {
    grid-area: time !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 16px 8px !important;
    background: rgba(124, 90, 227, 0.08) !important;
    border: 1px solid rgba(124, 90, 227, 0.15) !important;
    border-radius: 14px !important;
    width: 100% !important;
    text-align: center !important;
}

body.dark-mode.minimal .show-time {
    background: #1e1e24 !important;
    /* Deep Charcoal */
    border-color: #2d2d38 !important;
}

.minimal .show-time .t {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: var(--fg) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

.minimal .show-time .d {
    font-size: 0.8rem !important;
    color: var(--muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600 !important;
}

body.dark-mode.minimal .show-time .d {
    color: #ececec !important;
    /* Bright Mist for Date Visibility */
    font-weight: 700 !important;
    opacity: 0.9;
}

/* Fix the overlapping period badge */
.minimal .time-period {
    position: relative !important;
    display: inline-block !important;
    margin-top: 8px !important;
    z-index: 10 !important;
}

.minimal .show-main {
    grid-area: main !important;
    /* grid-row removed, auto-placement in center column */
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-self: start !important;
    align-items: flex-start !important;
    /* Align top */
    padding: 4px 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    /* Allow flex shrinking if needed */
    flex: 1 1 0% !important;
    /* Ensure it grows/shrinks properly */
}

.minimal .show-ctas {
    grid-area: ctas !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding: 10px 4px !important;
    /* Match Time column spacing: 12px 4px padding in .show-time */
    align-items: center !important;

}

/* Mobile: definitive overrides */
@media (max-width: 768px) {
    .minimal .show {
        grid-template-columns: 85px 1fr !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "time main"
            "ctas main" !important;
        gap: 12px 14px !important;
        padding: 20px 0 20px 12px !important;
    }

    .minimal .show-time {
        padding: 12px 4px !important;
    }

    .minimal .primary-ctas {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .minimal .primary-ctas .btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }

    /* Smaller comedian chips on mobile for 2-column flow */
    .show-comedians {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 3px 4px !important;
        justify-content: flex-start !important;
        padding: 4px 0 !important;
    }

    .comedian-wrapper {
        gap: 0 !important;
    }

    .comedian {
        padding: 3px 6px !important;
        font-size: 11px !important;
        border-radius: 5px !important;
    }

    /* Hide inline favorite stars on mobile - use tooltip instead */
    .fav-star {
        display: none !important;
    }
}



/* ============================================
   FORCED RESERVE BUTTON VISIBILITY
   Charcoal with centered text
   ============================================ */
/* Unified Button and Price Styling */
.minimal .price {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    background: var(--control-bg) !important;
    border: 1px solid var(--border) !important;
    padding: 6px 4px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--fg) !important;
}

body.dark-mode.minimal .price {
    background: #2a2a35 !important;
    /* Dark Slate */
    color: #ffffff !important;
    border-color: #3f3f4e !important;
}

.minimal .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 10px 4px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

.minimal .btn-secondary {
    padding: 8px 4px !important;
    font-size: 0.8rem !important;
    border-width: 1px !important;
    margin-top: 4px !important;
}

a.btn:hover,
.btn:hover,
.primary-ctas .btn:hover,
.primary-ctas a.btn:hover {
    background-color: #485a86 !important;
    /* Darker Muted Cobalt on Hover */
    background: #485a86 !important;
    transform: translateY(-1px);
}

body.dark-mode a.btn:hover,
body.dark-mode .btn:hover,
body.dark-mode .primary-ctas .btn:hover {
    background: #4b56b2 !important;
    /* Darker Indigo on Hover */
    background-color: #4b56b2 !important;
    transform: translateY(-1px);
}

/* Vibrant Indigo for Reserve Button in Dark Mode */
body.dark-mode.minimal .btn,
body.dark-mode.minimal .primary-ctas .btn {
    background: #5e6ad2 !important;
    background-color: #5e6ad2 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(94, 106, 210, 0.3) !important;
}

/* Ensure btn-secondary stays distinct */
/* Ensure btn-secondary stays distinct and Ghost-style */
.btn-secondary,
a.btn-secondary,
.btn.btn-secondary,
.show-ctas .btn.btn-secondary,
.show-ctas a.btn.btn-secondary {
    background-color: transparent !important;
    background: transparent !important;
    border: 2px solid #607D8B !important;
    /* Slate Gray (Light Mode) */
    color: #607D8B !important;
    box-shadow: none !important;
}

body.dark-mode .btn-secondary,
body.dark-mode a.btn-secondary,
body.dark-mode .btn.btn-secondary,
body.dark-mode .show-ctas .btn.btn-secondary,
body.dark-mode .show-ctas a.btn.btn-secondary {
    border-color: #66d9ef !important;
    /* Monokai Cyan (High Visibility) */
    color: #66d9ef !important;
}

.btn-secondary:hover,
a.btn-secondary:hover,
.show-ctas .btn.btn-secondary:hover,
.show-ctas a.btn.btn-secondary:hover {
    border-color: #607D8B !important;
    background: #607D8B !important;
    color: #ffffff !important;
}

body.dark-mode .btn-secondary:hover,
body.dark-mode a.btn-secondary:hover,
body.dark-mode .show-ctas .btn.btn-secondary:hover,
body.dark-mode .show-ctas a.btn.btn-secondary:hover {
    border-color: #66d9ef !important;
    background: #66d9ef !important;
    color: #222222 !important;
    /* Dark text on bright Cyan */
}

/* Aggressive removal of focus borders/outlines for filters as requested */
.header-controls input:focus,
.header-controls select:focus,
.header-controls button:focus,
.minimal .header-controls input:focus,
.minimal .header-controls select:focus,
.minimal .header-controls button:focus,
.controls input:focus,
.controls select:focus,
.filter-group select:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}