/* Roller Coaster Chronicles — Custom Styles */

/* ========== Color System ========== */
:root {
    --rcc-navy: #C4582A;
    --rcc-navy-dark: #A04520;
    --rcc-navy-light: #D97A48;
    --rcc-crimson: #8C1F33;
    --rcc-crimson-light: #A62840;
    --rcc-slate-blue: #E08850;
    --rcc-coral: #E06262;
    --rcc-info-blue: #D4884A;

    /* Wait time colors — match iOS app thresholds */
    --rcc-wait-green: #1B9E6A;
    --rcc-wait-gold: #D4A017;
    --rcc-wait-red: #C03838;

    /* Calendar crowd colors */
    --rcc-crowd-quiet: #2ECC71;
    --rcc-crowd-moderate: #F1C40F;
    --rcc-crowd-busy: #E74C3C;

    /* Neutrals */
    --rcc-bg: #f4f6f9;
    --rcc-bg-card: #ffffff;
    --rcc-border: #e2e8f0;
    --rcc-text: #1e293b;
    --rcc-text-muted: #64748b;
    --rcc-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --rcc-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --rcc-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --rcc-radius: 10px;
    --rcc-radius-lg: 14px;
}

body {
    background-color: var(--rcc-bg);
    color: var(--rcc-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========== Navbar ========== */
.rcc-nav {
    background: linear-gradient(135deg, #8C1F33 0%, #b22a3d 30%, #c4432e 60%, #d4652a 100%);
    box-shadow: 0 2px 16px rgba(140, 31, 51, 0.35);
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.rcc-nav .navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff !important;
    transition: opacity 0.15s;
}
.rcc-nav .navbar-brand:hover { opacity: 0.9; }
.rcc-nav .navbar-brand img {
    height: 36px;
    width: 36px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.rcc-nav .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.15s;
    letter-spacing: 0.01em;
}
.rcc-nav .nav-link:hover,
.rcc-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}
.rcc-nav .navbar-toggler {
    border-color: rgba(255,255,255,0.2);
    padding: 0.3rem 0.6rem;
}
.rcc-nav .navbar-toggler-icon {
    filter: brightness(2);
}

/* ── Notifications bell (Batch 3a) ── */
.rcc-bell-wrap { position: relative; }
.rcc-bell-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    padding: 0.5rem 0.6rem;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: background-color 0.12s;
    line-height: 1;
}
.rcc-bell-btn:hover,
.rcc-bell-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.rcc-bell-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}
.rcc-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1.5px solid #2a1810;
    font-variant-numeric: tabular-nums;
}
.rcc-bell-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(380px, calc(100vw - 2rem));
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    z-index: 1055;
    overflow: hidden;
    color: #1e293b;
}
.rcc-bell-panel[hidden] { display: none; }
.rcc-bell-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.rcc-bell-panel-title {
    font-weight: 700;
    font-size: 0.9rem;
}
.rcc-bell-mark-all {
    background: transparent;
    border: none;
    color: var(--rcc-navy);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.rcc-bell-mark-all:hover { text-decoration: underline; }
.rcc-bell-panel-list {
    max-height: 420px;
    overflow-y: auto;
}
.rcc-bell-panel-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    background: #f8fafc;
}
.rcc-bell-panel-footer a {
    color: var(--rcc-navy);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
.rcc-bell-panel-footer a:hover { text-decoration: underline; }
.rcc-bell-loading,
.rcc-bell-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}
.rcc-notif-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.12s;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}
.rcc-notif-item:last-child { border-bottom: none; }
.rcc-notif-item:hover { background: #f8fafc; color: inherit; }
.rcc-notif-item.is-unread {
    background: rgba(196, 88, 42, 0.04);
    border-left: 3px solid var(--rcc-navy);
    padding-left: calc(1rem - 3px);
}
.rcc-notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--rcc-navy);
    font-size: 0.9rem;
}
.rcc-notif-body {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #334155;
}
.rcc-notif-actor { font-weight: 700; color: #0f172a; }
.rcc-notif-snippet {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rcc-notif-time {
    color: #94a3b8;
    font-size: 0.7rem;
    margin-top: 2px;
}

@media (max-width: 575.98px) {
    .rcc-bell-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
    }
}

/* ── @mention suggestions popup (Batch 3b) ── */
.mention-suggestions {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 0.35rem;
    z-index: 2000;
    max-width: 280px;
    max-height: 240px;
    overflow-y: auto;
}
.mention-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.86rem;
    color: #1e293b;
    min-height: 36px;
    user-select: none;
}
.mention-suggestion-item.is-selected,
.mention-suggestion-item:hover {
    background: rgba(196, 88, 42, 0.08);
    color: var(--rcc-navy);
}
.mention-suggestion-at { color: var(--rcc-navy); font-weight: 700; }
.mention-suggestion-name { font-weight: 600; }

/* Mention link inside rendered comment bodies */
.comment-body-text a.mention {
    color: var(--rcc-navy);
    font-weight: 600;
    text-decoration: none;
}
.comment-body-text a.mention:hover {
    text-decoration: underline;
}

/* Footer */
[data-bs-theme] .bg-dark,
.bg-dark {
    --bs-dark-rgb: 48, 24, 16;
    --bs-bg-opacity: 1;
    background-color: #2a1810 !important;
}
footer.bg-dark {
    background-color: #2a1810 !important;
}

.btn-primary {
    background-color: var(--rcc-navy);
    border-color: var(--rcc-navy);
    border-radius: var(--rcc-radius);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--rcc-navy-dark);
    border-color: var(--rcc-navy-dark);
}
.btn-outline-primary {
    color: var(--rcc-navy);
    border-color: var(--rcc-navy);
    border-radius: var(--rcc-radius);
}
.btn-outline-primary:hover {
    background-color: var(--rcc-navy);
    border-color: var(--rcc-navy);
    color: #fff;
}
a { color: var(--rcc-navy); }
a:hover { color: var(--rcc-crimson); }
.navbar a, footer a { color: inherit; }

/* Breadcrumb */
.breadcrumb {
    font-size: 0.82rem;
    background: none;
    padding: 0;
    margin-bottom: 0.75rem;
}
.breadcrumb-item a {
    color: var(--rcc-slate-blue);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb-item a:hover {
    color: var(--rcc-crimson);
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: var(--rcc-text-muted);
    font-weight: 500;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: "\203A" !important;
    color: #bcc3cc;
    font-weight: 400;
    font-size: 1rem;
    vertical-align: baseline;
    line-height: 1;
    display: inline-block;
    transform: translateY(1px);
}

/* ========== Page Header ========== */
.page-header {
    text-align: center;
    padding: 2rem 0 1rem;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rcc-navy);
    margin: 0;
}
.page-header .subtitle {
    color: var(--rcc-text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ========== Search ========== */
.search-wrapper {
    max-width: 560px;
    margin: 0 auto 1.5rem;
    position: relative;
}
.search-wrapper .search-input {
    width: 100%;
    padding: 0.8rem 2.8rem 0.8rem 3rem;
    font-size: 1rem;
    border: 2.5px solid #c8cdd3;
    border-radius: 50px;
    background: var(--rcc-bg-card);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--rcc-text);
}
.search-wrapper .search-input:focus {
    border-color: var(--rcc-navy);
    box-shadow: 0 0 0 4px rgba(196, 88, 42, 0.12);
}
.search-wrapper .search-input::placeholder {
    color: #94a3b8;
}
.search-wrapper .icon-search {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.search-wrapper .icon-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: none;
    font-size: 1rem;
}
.search-wrapper .icon-clear.show { display: block; }

/* ========== Search Dropdown ========== */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--rcc-bg-card);
    border-radius: var(--rcc-radius-lg);
    box-shadow: var(--rcc-shadow-lg);
    z-index: 1050;
    max-height: 440px;
    overflow-y: auto;
    padding: 8px;
    display: none;
}
.search-dropdown.open { display: block; }
.search-dropdown-label {
    padding: 10px 14px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rcc-text-muted);
}
.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--rcc-text);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
}
.search-dropdown-item:hover,
.search-dropdown-item.active {
    background: #fff5f0;
    color: var(--rcc-navy);
    text-decoration: none;
}
.search-dropdown-item .thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.search-dropdown-item .thumb-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rcc-navy), var(--rcc-slate-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.search-dropdown-item .item-text { flex: 1; min-width: 0; }
.search-dropdown-item .item-name {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}
.search-dropdown-item .item-sub {
    font-size: 0.78rem;
    color: var(--rcc-text-muted);
    display: block;
}
.search-dropdown-empty {
    padding: 24px;
    text-align: center;
    color: var(--rcc-text-muted);
    font-size: 0.85rem;
}

/* ========== Filter Bar ========== */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    border: 2px solid #c8cdd3;
    background: var(--rcc-bg-card);
    color: #4a5568;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    user-select: none;
}
.filter-chip:hover {
    border-color: var(--rcc-navy);
    color: var(--rcc-navy);
    background: #fff5f0;
    text-decoration: none;
}
.filter-chip.selected {
    background: var(--rcc-navy);
    border-color: var(--rcc-navy);
    color: #fff;
}
.filter-bar-soft {
    gap: 0.4rem;
}
.filter-bar-soft .filter-chip {
    border-color: #d7dee8;
    background: rgba(255,255,255,0.82);
    color: #516173;
}
.filter-bar-soft .filter-chip:hover {
    border-color: #b7c5d8;
    color: var(--rcc-navy);
    background: #f7f9fc;
}
.filter-bar-soft .filter-chip.selected {
    background: rgba(196, 88, 42, 0.12);
    border-color: rgba(196, 88, 42, 0.36);
    color: var(--rcc-navy);
    box-shadow: 0 1px 6px rgba(196, 88, 42, 0.12);
}
.filter-chip .chip-count {
    font-size: 0.72rem;
    opacity: 0.75;
}
.filter-chip i { font-size: 0.85rem; }
.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--rcc-border);
    margin: 0 0.25rem;
}

/* Sub-filters */
.sub-filter-row {
    display: none;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: slideDown 0.2s ease;
}
.sub-filter-row.open { display: flex; }
.sub-chip {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    border: 2px solid #c8cdd3;
    background: var(--rcc-bg-card);
    color: #4a5568;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.sub-chip:hover {
    border-color: var(--rcc-navy);
    color: var(--rcc-navy);
    background: #fff5f0;
    text-decoration: none;
}
.sub-chip.selected {
    background: rgba(196, 88, 42, 0.12);
    border-color: rgba(196, 88, 42, 0.36);
    color: var(--rcc-navy);
    box-shadow: 0 1px 6px rgba(196, 88, 42, 0.12);
}
.sub-chip.selected i.bi-x {
    font-size: 0.85rem;
    margin-left: 2px;
    opacity: 0.65;
    vertical-align: middle;
}

/* ========== Section Headers ========== */
.group-header {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rcc-navy);
    padding-bottom: 0.5rem;
    margin: 1.75rem 0 1rem;
    border-bottom: 3px solid var(--rcc-crimson);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.group-header .count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rcc-text-muted);
}

/* ========== Park Cards ========== */
.park-card {
    background: var(--rcc-bg-card);
    border-radius: var(--rcc-radius-lg);
    overflow: hidden;
    border: 1px solid var(--rcc-border);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.park-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--rcc-shadow-md);
}
.park-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: #e8ecf0;
}
.park-card-placeholder {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--rcc-navy) 0%, var(--rcc-slate-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 2rem;
}
.park-card-body {
    padding: 0.85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.park-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rcc-text);
    margin: 0 0 0.2rem;
    line-height: 1.25;
}
.park-card-location {
    font-size: 0.75rem;
    color: var(--rcc-text-muted);
    margin: 0 0 0.5rem;
    flex: 1;
}
.park-card-meta {
    font-size: 0.72rem;
    color: var(--rcc-text-muted);
    margin: 0;
}
.park-status-dot {
    display: none;
    font-weight: 600;
    margin-left: 0.25rem;
}
.park-status-dot.open {
    display: inline;
    color: var(--rcc-wait-green);
}
.park-status-dot.open::before { content: "\2022  Open"; }
.park-status-dot.closed {
    display: inline;
    color: #b0b8c4;
}
.park-status-dot.closed::before { content: "\2022  Closed"; }

.park-card-hours {
    font-size: 0.68rem;
    color: var(--rcc-text-muted);
    margin: 0.15rem 0 0;
}
.park-card-spark {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.3rem;
}
.park-card-spark svg {
    display: block;
}


/* ========== Park Hero (Detail) ========== */
.park-hero {
    position: relative;
    height: 240px;
    border-radius: var(--rcc-radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--rcc-navy) 0%, var(--rcc-slate-blue) 100%);
}
.park-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.park-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.65) 100%);
    color: #fff;
}
.park-hero-overlay h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.park-hero-overlay .meta {
    font-size: 0.88rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ========== Ride Cards ========== */
.ride-card {
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 0.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.15s, box-shadow 0.15s;
}
.ride-card:hover {
    background: #fafbfc;
    box-shadow: var(--rcc-shadow-sm);
}
.ride-card-info { flex: 1; min-width: 0; }

/* Stacked layout for "Other Rides" — mobile only */
@media (max-width: 991.98px) {
    .ride-card-stacked {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        min-height: 5.5rem;
    }
    .ride-card-stacked .ride-card-name {
        font-size: 0.82rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ride-card-stacked .ride-card-wait {
        text-align: left;
    }
    .ride-card-stacked .ride-card-chevron {
        position: absolute;
        top: 0.6rem;
        right: 0.6rem;
    }
}
.ride-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rcc-text);
    margin: 0;
    line-height: 1.3;
}
.ride-card-section {
    font-size: 0.75rem;
    color: var(--rcc-text-muted);
    margin: 0.1rem 0 0;
}

/* Favorite star */
.fav-star {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.85rem;
    vertical-align: baseline;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.fav-star:hover { color: #f0b429; transform: scale(1.2); }
.fav-star.active { color: #f0b429; }
.fav-star.active:hover { color: #d49a20; }

/* Park card star — positioned far right */
.park-fav {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    font-size: 1.05rem;
    padding: 0;
    background: none;
    color: rgba(255,255,255,0.85);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.park-fav:hover { color: #f0b429; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.park-fav.active { color: #f0b429; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }

/* Park detail page star — inline with park name */
.park-detail-fav {
    position: relative;
    top: auto; right: auto;
    font-size: 0.85rem;
    vertical-align: middle;
    margin-left: 0.75rem;
    color: rgba(255,255,255,0.85);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.park-detail-fav:hover {
    color: #f0b429;
    background: rgba(255,255,255,0.25);
    border-color: rgba(240,180,41,0.5);
}
.park-detail-fav.active {
    color: #f0b429;
    background: rgba(240,180,41,0.15);
    border-color: rgba(240,180,41,0.4);
}

/* ========== Wait Badges ========== */
.wait-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
}
.wait-badge .wait-unit {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.8;
}
.wait-badge-green { background: var(--rcc-wait-green); }
.wait-badge-gold { background: var(--rcc-wait-gold); color: #1a1a1a; }
.wait-badge-red { background: var(--rcc-wait-red); }
.wait-badge-closed { background: #94a3b8; font-size: 0.75rem; font-weight: 600; }
.wait-badge-down { background: var(--rcc-wait-red); font-size: 0.75rem; font-weight: 600; }
.wait-badge-refurb { background: var(--rcc-wait-gold); color: #1a1a1a; font-size: 0.75rem; font-weight: 600; }

/* Plain wait time display (no pill/badge) */
.wait-time {
    font-weight: 700;
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1;
}
.wait-time .wait-unit {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.7;
}
.wait-color-green { color: var(--rcc-wait-green); }
.wait-color-gold { color: var(--rcc-wait-gold); }
.wait-color-red { color: var(--rcc-wait-red); }
.wait-color-closed { color: #94a3b8; }

.wait-status {
    font-size: 0.78rem;
    font-weight: 600;
}
.wait-status-closed { color: #94a3b8; }
.wait-status-down { color: var(--rcc-wait-red); }
.wait-status-refurb { color: var(--rcc-wait-gold); }

/* Number animation */
.wait-number { transition: opacity 0.25s; font-variant-numeric: tabular-nums; }

/* Trend arrows */
.trend-arrow {
    font-size: 0.55rem;
    margin-left: 3px;
    vertical-align: middle;
    animation: trendFade 10s forwards;
}
.trend-up { color: var(--rcc-wait-red); }
.trend-down { color: var(--rcc-wait-green); }
@keyframes trendFade {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Single rider wait */
.single-rider-wait {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--rcc-text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

/* Community/verified wait times */
.community-inline {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rcc-navy);
    background: rgba(26, 77, 112, 0.08);
    padding: 1px 7px;
    border-radius: 8px;
    white-space: nowrap;
}
.community-inline i {
    font-size: 0.58rem;
    opacity: 0.6;
    margin-right: 1px;
}

/* Ride card wait column */
.ride-card-wait {
    text-align: right;
    flex-shrink: 0;
}

/* Last updated micro-text */
.ride-card-updated {
    display: block;
    font-size: 0.65rem;
    color: #b0b8c4;
    margin-top: 2px;
}

/* Refresh button spin */
#refresh-btn {
    transition: transform 0.3s;
}
#refresh-btn.refreshing i {
    animation: refreshSpin 0.8s linear infinite;
}
@keyframes refreshSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Star bounce */
@keyframes starBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.fav-star.bounce {
    animation: starBounce 0.35s ease;
}

/* Card stagger fade-in */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.park-card {
    animation: cardFadeIn 0.35s ease both;
}

/* Wait badge pulse (Closed → Operating) */
@keyframes waitPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 12px rgba(27, 158, 106, 0.4); }
}
.ride-card.just-opened {
    animation: waitPulse 0.8s ease;
}

/* ========== Alert Bell ========== */
.alert-bell {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.2rem;
    margin-right: 0.5rem;
    transition: color 0.15s, transform 0.15s;
    vertical-align: middle;
}
.alert-bell:hover { color: var(--rcc-navy); transform: scale(1.2); }
.alert-bell.active { color: var(--rcc-navy); }

.alert-badge {
    font-size: 0.65rem;
    background: var(--rcc-navy);
    color: #fff;
    padding: 1px 5px;
    border-radius: 50px;
    margin-left: 3px;
}

/* Alert picker popover */
.alert-picker {
    position: absolute;
    right: 0.5rem;
    top: calc(100% + 4px);
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius);
    box-shadow: var(--rcc-shadow-lg);
    padding: 0.6rem;
    z-index: 100;
    min-width: 160px;
    animation: slideDown 0.15s ease;
}
.alert-picker-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rcc-text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.alert-picker-options { display: flex; gap: 0.3rem; }
.alert-picker-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    border: 1.5px solid var(--rcc-border);
    background: var(--rcc-bg-card);
    color: var(--rcc-text);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}
.alert-picker-btn:hover {
    background: var(--rcc-navy);
    border-color: var(--rcc-navy);
    color: #fff;
}

/* Alerts list panel */
.alerts-list-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius);
    box-shadow: var(--rcc-shadow-lg);
    padding: 0.6rem;
    z-index: 100;
    min-width: 240px;
    animation: slideDown 0.15s ease;
}
.alerts-list-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rcc-text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.alerts-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--rcc-border);
}
.alerts-list-item:last-child { border-bottom: none; }
.alerts-list-item span:first-child { flex: 1; font-weight: 500; }
.alerts-list-thresh { color: var(--rcc-text-muted); font-size: 0.75rem; }
.alerts-list-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 0.2rem;
    font-size: 0.9rem;
}
.alerts-list-remove:hover { color: var(--rcc-wait-red); }

/* Make ride-card position relative for alert picker */
.ride-card { position: relative; }

/* ========== Best Times Today ========== */
.best-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rcc-border);
}
.best-time-row:last-child { border-bottom: none; }
.best-time-info { flex: 1; min-width: 0; }
.best-time-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--rcc-text);
}
.best-time-rec {
    display: block;
    font-size: 0.75rem;
    color: var(--rcc-text-muted);
    margin-top: 1px;
}
.best-time-rec strong {
    color: var(--rcc-wait-green);
    font-weight: 700;
}
.best-time-spark {
    flex-shrink: 0;
    margin-left: 1rem;
}

/* ========== Shimmer Placeholders ========== */
.ride-card-shimmer {
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius);
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
.shimmer-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f5 25%, #e2e8f0 50%, #eef1f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.shimmer-line.w-60 { width: 60%; }
.shimmer-line.w-40 { width: 40%; }
.shimmer-badge {
    width: 52px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef1f5 25%, #e2e8f0 50%, #eef1f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========== Calendar ========== */

/* Year tabs */
/* ── Crowd Calendar: Picker ── */
.cal-picker {
    max-width: 1060px;
    margin: 0 auto 1.5rem;
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--rcc-shadow-sm);
}
.cal-picker-years {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0.75rem;
}
.cal-yr-btn {
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    color: var(--rcc-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.cal-yr-btn:hover { background: rgba(26, 77, 112, 0.06); color: var(--rcc-navy); }
.cal-yr-btn.active {
    background: var(--rcc-navy);
    color: #fff;
    box-shadow: 0 2px 6px rgba(26, 77, 112, 0.25);
}
.cal-picker-months {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.cal-mo-btn {
    border: 1.5px solid transparent;
    background: rgba(26, 77, 112, 0.04);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.45rem 0;
    color: var(--rcc-text);
    cursor: pointer;
    transition: all 0.15s;
}
.cal-mo-btn:hover:not([disabled]) {
    border-color: var(--rcc-navy);
    color: var(--rcc-navy);
    background: rgba(26, 77, 112, 0.08);
}
.cal-mo-btn.active {
    background: var(--rcc-navy);
    border-color: var(--rcc-navy);
    color: #fff;
}
.cal-mo-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Month label ── */
.cal-month-label {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--rcc-navy);
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

/* ── Calendar grid ── */
.cal-wrap {
    min-height: 820px;
    max-width: 1060px;
    margin: 0 auto;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.cal-head {
    padding: 0.6rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rcc-text-muted);
}

/* ── Day cell ── */
.cal-day {
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    align-items: center;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    position: relative;
    padding: 10px 7px 9px;
    min-height: 130px;
    gap: 0;
}
.cal-day:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Day number — top-left */
.cal-day-num {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    align-self: flex-start;
    color: currentColor;
    background: rgba(255,255,255,0.55);
    border-radius: 20px;
    padding: 0.22rem 0.45rem;
    letter-spacing: 0.01em;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Crowd % — the big hero number, vertically centered */
.cal-day-pct {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-top: auto;
    margin-bottom: auto;
}
.cal-day-pct small {
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.65;
}

/* Weather + temp — compact row below % */
.cal-day-meta {
    font-size: 0.74rem;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0.7;
    margin-top: 4px;
}
.cal-day-meta i { font-size: 0.74rem; }

/* Park hours — bottom */
.cal-day-hours {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.45;
    line-height: 1;
    margin-top: 3px;
}

/* Holiday star */
.cal-day-holiday {
    position: absolute;
    top: 5px;
    right: 6px;
    font-size: 0.6rem;
    color: #d4a017;
    line-height: 1;
}

/* Day states */
.cal-today { outline: 2.5px solid var(--rcc-navy); outline-offset: -2.5px; }
.cal-day-empty { cursor: default; background: transparent; min-height: 0; }
.cal-day-empty:hover { transform: none; box-shadow: none; }
.cal-day-noclick { cursor: default; }
.cal-day-noclick:hover { transform: none; box-shadow: none; }
.cal-day-l1 { background: rgba(16, 140, 70, 0.30); color: #0d6e3a; }   /* 0-12%  — empty */
.cal-day-l2 { background: rgba(24, 165, 80, 0.32); color: #11693a; }   /* 13-25% — quiet */
.cal-day-l3 { background: rgba(110, 175, 18, 0.32); color: #365a10; }  /* 26-37% — light */
.cal-day-l4 { background: rgba(180, 175, 20, 0.30); color: #555208; }  /* 38-50% — moderate */
.cal-day-l5 { background: rgba(210, 155, 8, 0.32); color: #6e400a; }   /* 51-62% — steady */
.cal-day-l6 { background: rgba(220, 130, 10, 0.32); color: #7a350c; }  /* 63-75% — busy */
.cal-day-l7 { background: rgba(210, 90, 35, 0.32); color: #822c10; }   /* 76-87% — very busy */
.cal-day-l8 { background: rgba(195, 45, 35, 0.32); color: #7f1818; }   /* 88-100% — packed */
.cal-day-none { background: #f0f2f5; color: #bdc3c7; }
.cal-prior-years { display: flex; flex-direction: column; gap: 3px; margin: auto 0; min-width: 0; overflow: hidden; }
.cal-prior-row { display: flex; align-items: center; gap: 0.35rem; font-size: 0.92rem; font-weight: 600; line-height: 1.3; }
.cal-prior-year { font-size: 0.78rem; color: #5b6370; font-weight: 700; min-width: 2rem; }

/* Skeleton loading */
.cal-day-skeleton { background: #f0f2f5; }
.skeleton-pulse {
    display: inline-block;
    background: linear-gradient(90deg, #e8eaed 25%, #f3f4f6 50%, #e8eaed 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Legend ── */
.cal-legend {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--rcc-text-muted);
    max-width: 1060px;
    margin-left: auto;
    margin-right: auto;
}
.cal-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.cal-legend-dot { width: 12px; height: 12px; border-radius: 3px; }
.cal-dot-l1 { background: rgba(16, 140, 70, 0.50); }
.cal-dot-l2 { background: rgba(24, 165, 80, 0.50); }
.cal-dot-l3 { background: rgba(110, 175, 18, 0.50); }
.cal-dot-l4 { background: rgba(180, 175, 20, 0.48); }
.cal-dot-l5 { background: rgba(210, 155, 8, 0.50); }
.cal-dot-l6 { background: rgba(220, 130, 10, 0.50); }
.cal-dot-l7 { background: rgba(210, 90, 35, 0.50); }
.cal-dot-l8 { background: rgba(195, 45, 35, 0.50); }
.cal-dot-none { background: #eef1f5; }

/* ── Day detail panel ── */
.calendar-detail {
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius-lg);
    padding: 1.25rem;
    margin-top: 1rem;
    animation: slideDown 0.2s ease;
    max-width: 1060px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== Ride Card Expand ==========*/

/* Wrapper: holds the .ride-card + .ride-card-expand stacked vertically */
.ride-card-wrapper {
    position: relative;
    border-radius: var(--rcc-radius);
    overflow: hidden;
    margin-bottom: 0.15rem;
    /* Subtle lift shadow that appears when expanded */
    transition: box-shadow 0.3s ease;
}
.ride-card-wrapper:has(.ride-card.expanded) {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Ride card becomes clickable — override the static base style */
.ride-card[data-ride-slug] {
    cursor: pointer;
    border-radius: var(--rcc-radius) var(--rcc-radius) 0 0;
    border-bottom: none;
    margin-bottom: 0;
    user-select: none;
}
/* When a card sits in the wrapper and is NOT expanded, restore bottom rounding */
.ride-card-wrapper:not(:has(.ride-card.expanded)) .ride-card[data-ride-slug] {
    border-radius: var(--rcc-radius);
    border-bottom: 1px solid var(--rcc-border);
}
/* Hover for expandable cards */
.ride-card[data-ride-slug]:hover {
    background: #f5f7fa;
    box-shadow: none;
}
.ride-card[data-ride-slug].expanded {
    background: #f5f7fa;
    border-bottom-color: transparent;
}

/* Chevron icon in the ride card */
.ride-card-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 0.35rem;
    color: #bdc7d4;
    font-size: 0.72rem;
    transition: color 0.2s;
}
.ride-card[data-ride-slug]:hover .ride-card-chevron {
    color: var(--rcc-navy);
}
.ride-card[data-ride-slug].expanded .ride-card-chevron {
    color: var(--rcc-navy);
}
.ride-card-chevron i {
    display: block;
    transition: transform 0.3s ease;
}

/* The expansion panel — starts collapsed (height: 0) */
.ride-card-expand {
    height: 0;
    overflow: hidden;
    background: #f8f9fb;
    border: 1px solid var(--rcc-border);
    border-top: none;
    border-radius: 0 0 var(--rcc-radius) var(--rcc-radius);
}
/* When aria-hidden=false (panel open) without height override let content breathe */
.ride-card-expand[aria-hidden="false"]:not([style*="height: 0"]) {
    border-top: 1px solid var(--rcc-border);
}

/* Inner padding container */
.ride-expand-inner {
    padding: 0.9rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Year section */
.ride-expand-year {
    /* stagger animation applied via JS */
}

.ride-expand-year-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--rcc-navy);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.ride-expand-avg {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--rcc-text-muted);
}
.ride-expand-year-today { background: rgba(26, 77, 112, 0.04); border-radius: 6px; padding: 0.5rem; margin: -0.25rem -0.5rem 0.5rem; }
.ride-expand-year-today .ride-expand-year-label strong { color: var(--rcc-navy); }
.ride-expand-item-empty { opacity: 0.5; }

/* Hourly grid — wraps, ~4 per row on small screens */
.ride-expand-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Individual hour+wait pair */
.ride-expand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid var(--rcc-border);
    border-radius: 7px;
    padding: 5px 9px 4px;
    min-width: 42px;
    text-align: center;
    transition: box-shadow 0.15s;
}
.ride-expand-item:hover {
    box-shadow: var(--rcc-shadow-sm);
}
.ride-expand-hour {
    font-size: 0.65rem;
    color: var(--rcc-text-muted);
    font-weight: 500;
    line-height: 1;
    margin-bottom: 3px;
}
.ride-expand-wait {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* No data text */
.ride-expand-nodata {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    font-style: italic;
}

/* Divider between year sections */
.ride-expand-year + .ride-expand-year {
    border-top: 1px solid var(--rcc-border);
    padding-top: 0.75rem;
}

@media (max-width: 575.98px) {
    .ride-expand-item {
        min-width: 38px;
        padding: 4px 7px;
    }
    .ride-expand-wait { font-size: 0.82rem; }
    .ride-expand-hour { font-size: 0.6rem; }
    .ride-expand-inner { padding: 0.75rem 0.75rem 0.6rem; }
}

/* ========== Utilities ========== */
.card-styled {
    background: var(--rcc-bg-card);
    border: 1px solid var(--rcc-border);
    border-radius: var(--rcc-radius-lg);
    box-shadow: var(--rcc-shadow-sm);
}

/* ========== Animations ========== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== Responsive ========== */
@media (max-width: 767.98px) {
    .park-hero { height: 180px; border-radius: 0; margin: 0 -0.75rem 1.25rem; }
    .park-hero-overlay h1 { font-size: 1.4rem; }
    .group-header { font-size: 1rem; }
    .park-card-img, .park-card-placeholder { height: 110px; }
    .page-header h1 { font-size: 1.5rem; }
}
@media (max-width: 575.98px) {
    .filter-bar {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .filter-bar::-webkit-scrollbar { display: none; }
    .filter-chip { white-space: nowrap; flex-shrink: 0; }
    .cal-grid { gap: 3px; }
    .cal-wrap { min-height: 540px; }
    .cal-day { min-height: 80px; padding: 5px 3px 4px; }
    .cal-day-num { font-size: 0.7rem; }
    .cal-day-pct { font-size: 1rem; }
    .cal-day-pct small { font-size: 0.55rem; }
    .cal-day-meta { font-size: 0.55rem; }
    .cal-day-meta i { font-size: 0.55rem; }
    .cal-day-hours { font-size: 0.5rem; }
    .cal-day-holiday { font-size: 0.48rem; }
    .cal-yr-btn { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
    .cal-mo-btn { font-size: 0.72rem; }
    .cal-picker-months { grid-template-columns: repeat(4, 1fr); }
    .cal-picker { padding: 0.75rem; }
    .cal-month-label { font-size: 1.05rem; }
}
