/* Calendar section below the landing (design/calendar.md): the dark background carries on, gigs sit
   on frosted cards like the landing buttons, and the month view's popup is a light card like the
   About Us sheet. */

.calendar {
    --pad-top: clamp(40px, 8vw, 72px);
    --gold: #e6b450;  /* the logo badge's gold, for the Up next show (B-10) */
    padding: var(--pad-top) var(--gutter) calc(64px + env(safe-area-inset-bottom, 0px));
    /* Reached from the ribbon, the heading lands just under it rather than a padding's height below. */
    scroll-margin-top: calc(16px - var(--pad-top));
    background: #08080a;
}

.calendar-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* The heading row is a .section-head (landing.css). */

.calendar h3 {
    margin: 0;
    font-size: 1.25rem;
}

/* List / Month, and Media's Photos / Videos: a frosted pill with the chosen half lit. */
.view-switch {
    display: inline-flex;
    padding: 4px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
}

.view-switch[hidden] { display: none; }

.view-switch button {
    appearance: none;
    margin: 0;
    padding: 0.55em 1.2em;
    font: 600 0.95rem/1 var(--font);
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
    border: 0;
    border-radius: 4px;  /* inside the 6 px switch, less its 4 px padding (B-10) */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.view-switch button[aria-pressed="true"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

.view-switch button:focus-visible,
.month button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.calendar-status {
    margin: 0 0 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.calendar-status:empty { display: none; }

/* ---- List ---------------------------------------------------------------------------------- */

/* UP NEXT (or LIVE), UPCOMING, PAST SHOWS: small spaced capitals (B-10). */
.gig-list h3 {
    margin: 40px 0 16px;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.gig-list h3:first-child { margin-top: 0; }

.gig-list h3.is-live {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

/* A red dot that pulses while the show is on; it holds still with reduced motion. */
.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4b4b;
    animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 75, 75, 0.7); }
    50% { box-shadow: 0 0 0 7px rgba(255, 75, 75, 0); }
}

.gigs {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gig {
    position: relative;
    padding: 18px 20px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
}

.gig p { margin: 0; }

.gig-when {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.gig-time { white-space: nowrap; }

/* Who's playing (B-8): a small tag at the end of the date and time. */
.gig-group {
    display: inline-block;
    margin-left: 12px;
    padding: 1px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: 1px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
}

.gig .gig-event {
    margin-top: 6px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.75);
}

.gig .gig-venue {
    margin-top: 4px;
    font-size: 1.2rem;
    font-weight: 700;
}

.gig-address { color: rgba(255, 255, 255, 0.7); }

/* The Up next show (B-10): larger, with a gold border and glow, the logo badge's gold. */
.gig.is-next {
    padding: 24px 26px;
    background: rgba(230, 180, 80, 0.10);
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(230, 180, 80, 0.35), 0 0 28px rgba(230, 180, 80, 0.28);
}

.gig.is-next .gig-venue { font-size: 1.55rem; }

/* "Show N more" / "Show fewer" under UPCOMING and PAST SHOWS (B-12). */
.list-more {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0.6em 1.1em;
    font: 600 0.95rem/1 var(--font);
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.list-more::after { content: "\25BE"; }  /* ▾, ▴ once unfolded */

.list-more[aria-expanded="true"]::after { content: "\25B4"; }

.list-more:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.list-more:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Cancelled: everything struck through except the label saying so. */
.gig.is-cancelled .gig-details {
    text-decoration: line-through;
    opacity: 0.6;
}

.gig-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(220, 70, 70, 0.55);
    border-radius: var(--radius);
}

/* ---- Month --------------------------------------------------------------------------------- */

.month { position: relative; }

.month[hidden] { display: none; }

.month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.month-head h3 { text-align: center; }

.month-nav {
    appearance: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    font: 400 1.6rem/1 var(--font);
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.month-nav:hover { background: rgba(255, 255, 255, 0.2); }

.month-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    table-layout: fixed;
}

.month-grid th {
    padding: 4px 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.month-grid td {
    padding: 0;
    height: clamp(44px, 9vw, 72px);
    vertical-align: top;
}

.day {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 6px;
    font: 500 0.95rem/1 var(--font);
    text-align: left;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
}

.day.is-today { border-color: rgba(255, 255, 255, 0.7); }

/* A day with a gig: brighter, and a dot (hollow when every gig that day is cancelled). */
button.day {
    appearance: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button.day:hover,
button.day[aria-expanded="true"] { background: rgba(255, 255, 255, 0.28); }

button.day::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: #fff;
}

button.day.is-cancelled::after {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
}

/* The Up next show's day: a gold border and a gold dot (B-10). */
button.day.is-next {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(230, 180, 80, 0.3);
}

button.day.is-next::after { background: var(--gold); }

/* The popup on a day: a light card like the About Us sheet. */
.gig-popup {
    position: absolute;
    z-index: 5;
    width: min(340px, 100%);
    padding: 18px 20px 20px;
    color: #1d1d1f;
    background: #f7f6f3;
    border-radius: var(--radius);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    outline: none;
}

.gig-popup[hidden] { display: none; }

.gig-popup h4 {
    margin: 0 36px 12px 0;
    font-size: 1.05rem;
}

.gig-popup-close {
    appearance: none;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    font: 400 1.5rem/1 var(--font);
    color: #3a3a3c;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.gig-popup-close:hover { background: rgba(0, 0, 0, 0.07); }

.gig-popup-close:focus-visible {
    outline: 3px solid #1d1d1f;
    outline-offset: 1px;
}

.gig-popup .gig {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.gig-popup .gig + .gig {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.gig-popup .gig-when,
.gig-popup .gig .gig-event { color: #3a3a3c; }

.gig-popup .gig-address { color: #6b6b70; }

.gig-popup .gig-badge { background: #c43c3c; }

.gig-popup .gig-group {
    margin-left: 8px;
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.18);
}

@media (max-width: 520px) {
    .gig { padding: 16px; }
    .gig.is-next { padding: 20px 18px; }
    .gig.is-next .gig-venue { font-size: 1.35rem; }
    .month-grid { border-spacing: 2px; }
    .day { padding: 4px; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    .live-dot { animation: none; box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.35); }
}
