/* ABOUTME: Styles for the programme page — day tabs, venue filter, timeline and grid views */
/* ABOUTME: Venue colours are set as custom properties on .ev--<venue> and reused by both views */

body {
    /* The same ground the tickets and line-up pages use. */
    background-color: #eef0f8;
    background-image: linear-gradient(#7d86ef, #c9cff7 150px, #eef0f8 420px);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.program-section {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 12rem 2.5rem 3.5rem;
    box-sizing: border-box;
}


/* ---- Day tabs ---- */

/* The days share the row evenly; their text hugs the left edge so a wide tab
   does not read as an empty box. */
.program-days {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.day-tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.65rem 0.8rem 0.7rem;
    background-color: white;
    border: 1px solid rgba(32, 29, 252, 0.15);
    border-radius: 0.4rem;
    color: var(--light-blue);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.day-tab-label {
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1;
}

.day-tab-date {
    max-width: 100%;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(32, 29, 252, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-tab:hover {
    border-color: rgba(32, 29, 252, 0.45);
}

.day-tab.is-active {
    background-color: var(--light-blue);
    border-color: var(--light-blue);
    color: white;
}

.day-tab.is-active .day-tab-date {
    color: rgba(255, 255, 255, 0.7);
}

/* ---- Toolbar: venue filter, day note and view switch ---- */

/* The venues take the row and the view switch is pushed to its far end. */
.program-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.program-venues {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.chip {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    padding: 0.42rem 0.6rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(32, 29, 252, 0.15);
    background-color: white;
    color: rgba(32, 29, 252, 0.75);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
    border-color: rgba(32, 29, 252, 0.45);
}

.chip.is-active {
    background-color: var(--light-blue);
    border-color: var(--light-blue);
    color: white;
}

/* The active chip wears its venue's colour, the same one its cards carry. */
.chip--varudvar.is-active {
    background-color: var(--viola);
    border-color: var(--viola);
    color: white;
}

.chip--pajta.is-active {
    background-color: #ffd0e8;
    border-color: #ffd0e8;
    color: var(--dark-blue);
}

.chip--kertmozi.is-active {
    background-color: var(--light-salmon-red);
    border-color: var(--light-salmon-red);
    color: var(--dark-blue);
}

/* Two-position switch: the filled half marks the active view. */
.program-views {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    gap: 0.15rem;
    padding: 0.15rem;
    border: 1px solid rgba(32, 29, 252, 0.15);
    border-radius: 0.35rem;
    background-color: white;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 1.65rem;
    padding: 0;
    border: none;
    border-radius: 0.25rem;
    background-color: transparent;
    color: rgba(32, 29, 252, 0.75);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.view-btn:hover {
    background-color: rgba(32, 29, 252, 0.08);
}

.view-btn.is-active {
    background-color: var(--light-blue);
    color: white;
}

.view-icon {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
}

.day-note {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(32, 29, 252, 0.55);
    margin: 0.7rem 0 1.4rem;
}

/* The line that closes the programme: the schedule can still move. */
.program-disclaimer {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
    color: rgba(32, 29, 252, 0.55);
    margin: 1.8rem 0 0;
}

.program-empty {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: rgba(32, 29, 252, 0.6);
    background-color: white;
    border: 1px solid rgba(32, 29, 252, 0.15);
    border-radius: 0.4rem;
    padding: 2.5rem 1rem;
    text-align: center;
}

/* ---- Event card, shared by both views ---- */

.ev {
    background-color: var(--ev-bg);
    color: var(--ev-text);
    border: 1px solid var(--ev-border);
    border-radius: 0.4rem;
    box-sizing: border-box;
}

.ev--varudvar {
    --ev-bg: var(--viola);
    --ev-text: white;
    --ev-border: rgba(4, 1, 216, 0.35);
    --ev-muted: rgba(255, 255, 255, 0.75);
    --ev-pill-bg: white;
    --ev-pill-text: var(--dark-blue);
    --ev-time-bg: rgba(255, 255, 255, 0.22);
    --ev-time-text: white;
}

.ev--pajta {
    --ev-bg: #ffd0e8;
    --ev-text: var(--dark-blue);
    --ev-border: rgba(32, 29, 252, 0.15);
    --ev-muted: rgba(4, 1, 216, 0.7);
    --ev-pill-bg: var(--pink);
    --ev-pill-text: white;
    --ev-time-bg: rgba(255, 255, 255, 0.75);
    --ev-time-text: var(--dark-blue);
}

.ev--kertmozi {
    --ev-bg: var(--light-salmon-red);
    --ev-text: var(--dark-blue);
    --ev-border: rgba(32, 29, 252, 0.15);
    --ev-muted: rgba(4, 1, 216, 0.7);
    --ev-pill-bg: white;
    --ev-pill-text: var(--red);
    --ev-time-bg: rgba(255, 255, 255, 0.55);
    --ev-time-text: var(--dark-blue);
}

/* On the day that is running, what is over steps back and what is on stands out. */
.ev.is-past {
    opacity: 0.4;
}

/* Red is the one colour no venue wears, so what is on reads on every card. */
.ev.is-live {
    box-shadow: 0 0 0 2px var(--red);
}

/* The grid says where the day has got to with a line through every venue, so a
   block that is on takes none of the ring the cards carry. */
.grid-block.is-live {
    box-shadow: none;
}

.ev-pill,
.ev-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    padding: 0.3rem 0.42rem;
    border-radius: 0.2rem;
    white-space: nowrap;
}

.ev-pill--venue {
    background-color: var(--ev-pill-bg);
    color: var(--ev-pill-text);
}

.ev-pill--venue em {
    font-style: normal;
    font-size: 0.85em;
    opacity: 0.75;
}

.ev-pill--time {
    background-color: var(--ev-time-bg);
    color: var(--ev-time-text);
}

.ev-badge {
    background-color: var(--black);
    color: white;
}

/* Rendered on every card and shown only while the event is on, so the state can
   be refreshed by toggling one class rather than re-rendering the programme. */
.ev-badge--live {
    display: none;
    background-color: var(--red);
}

.ev.is-live .ev-badge--live {
    display: inline-flex;
}

.ev-icon {
    width: 0.9em;
    height: 0.9em;
    flex-shrink: 0;
}

.ev-title {
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.2;
    margin: 0;
    color: var(--ev-text);
}

/* The name the slot was announced under, kept beside the act that replaced it. */
.ev-title-replaced {
    opacity: 0.6;
}

.ev-note {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 0.3rem 0 0;
    color: var(--ev-muted);
}

/* ---- Timeline view ---- */

.tl-row {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 1.25rem;
    padding-bottom: 0.8rem;
}

.tl-time {
    position: relative;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--light-blue);
    text-align: right;
    padding: 0.5rem 1.1rem 0 0;
}

/* Rail running through the whole timeline, with a marker at every time slot. */
.tl-time::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: -0.8rem;
    right: 0;
    width: 1px;
    background-color: rgba(32, 29, 252, 0.2);
}

.tl-row:last-child .tl-time::before {
    bottom: auto;
    height: 1.4rem;
}

.tl-time::after {
    content: '';
    position: absolute;
    top: 0.6rem;
    right: -3.5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--light-blue);
}

.tl-events {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.tl-events .ev {
    padding: 0.7rem 0.8rem 0.8rem;
}

.ev-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.55rem;
}

/* ---- Grid view ---- */

.grid-layout {
    display: flex;
}

/* Venue names live outside the scroller so the blocks never slide under them. */
.grid-labels {
    flex: 0 0 8rem;
    display: flex;
    flex-direction: column;
    margin-right: 0.8rem;
}

.grid-labels-head {
    flex: 0 0 auto;
    height: 1.9rem;
}

.grid-label {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0.4rem;
    box-sizing: border-box;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--light-blue);
}

.grid-label em {
    font-family: 'Space Grotesk', sans-serif;
    font-style: normal;
    font-size: 0.68em;
    line-height: 1.3;
    color: rgba(32, 29, 252, 0.55);
}

.grid-scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: var(--light-blue) rgba(32, 29, 252, 0.12);
}

.grid-scroll::-webkit-scrollbar {
    height: 8px;
}

.grid-scroll::-webkit-scrollbar-track {
    background-color: rgba(32, 29, 252, 0.12);
    border-radius: 100rem;
}

.grid-scroll::-webkit-scrollbar-thumb {
    background-color: var(--light-blue);
    border-radius: 100rem;
}

.grid-inner {
    position: relative;
    display: inline-block;
    min-width: 100%;
}

.grid-ticks {
    position: relative;
    height: 1.9rem;
}

.grid-tick {
    position: absolute;
    top: 0;
    padding-left: 0.35rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: rgba(32, 29, 252, 0.55);
    border-left: 1px solid rgba(32, 29, 252, 0.2);
}

.grid-lanes {
    position: relative;
    margin-bottom: 0.4rem;
    background-image: repeating-linear-gradient(to right, rgba(32, 29, 252, 0.12) 0 1px, transparent 1px var(--hour-width));
    border-radius: 0.4rem;
}

/* The point the day has reached, drawn from the hour scale down through every
   venue. Behind the blocks a hover lifts, and never in the way of a click. */
.grid-now {
    position: absolute;
    top: 1.05rem;
    bottom: 0.4rem;
    width: 2px;
    margin-left: -1px;
    background-color: var(--red);
    border-radius: 1px;
    pointer-events: none;
    z-index: 4;
}

/* A head where the line meets the hour scale, so it reads as a marker. */
.grid-now::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--red);
}

.grid-block {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.65rem;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Titles stay on one line; hovering opens the block up to the full name. */
.grid-block:hover {
    z-index: 5;
    min-width: max-content;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(4, 1, 216, 0.22);
}

.grid-block-time {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ev-muted);
    white-space: nowrap;
}

.grid-block-title {
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Responsive ---- */

/* Laptop: 1024px – 1600px */
@media (max-width: 1600px) {
    .page-heading {
        font-size: 2.8rem;
    }
}

/* Tablet: 768px – 1023px */
@media (max-width: 1023px) {
    .program-section {
        padding: 12rem 1.5rem 3rem;
    }

    .page-heading {
        font-size: 2.4rem;
    }

    /* Five tabs no longer fit the row, so they scroll instead of shrinking
       below the width their dates need. A half-shown tab at the edge says
       plainly enough that the row moves, so it keeps no scrollbar. */
    .program-days {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .program-days::-webkit-scrollbar {
        display: none;
    }

    .day-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .grid-labels {
        flex-basis: 7rem;
    }

    .grid-label {
        font-size: 0.9rem;
    }

}

/* Mobile (nagy): 480px – 767px */
@media (max-width: 767px) {
    .page-heading {
        font-size: 2rem;
    }

    .program-section {
        padding: 12rem 1.25rem 2.5rem;
    }

    /* The chips wrap onto a second line here; the switch stays level with the
       first one instead of floating against the middle of the block. */
    .program-bar {
        align-items: flex-start;
    }

    /* The rail would eat too much width, so the time sits above its cards. */
    .tl-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        padding-bottom: 1.1rem;
    }

    .tl-time {
        text-align: left;
        padding: 0;
        font-size: 1.35rem;
    }

    .tl-time::before,
    .tl-time::after {
        display: none;
    }

    .grid-labels {
        flex-basis: 5.5rem;
        margin-right: 0.5rem;
    }

    .grid-label {
        font-size: 0.85rem;
    }

    .grid-block-title {
        font-size: 0.85rem;
    }

    /* Three columns would leave a cell narrower than the widest logo needs,
       which is what pulls the row out of line. */
}

/* Mobile (kicsi): 320px – 480px */
@media (max-width: 480px) {
    .program-section {
        padding: 9rem 1.25rem 2.5rem;
    }

    .page-heading {
        font-size: 2rem;
    }

}
