/* Agenda grid + session detail — modern minimalist take on the legacy
   "programme-row / programme-item / theme_* / type_*" vocabulary.
   No Bootstrap, no tooltip JS — speaker info is visible inline and the
   speaker modal is reused from speakers.css.

   Project root convention: html { font-size: 6.25% } → 1rem = 1px.
   All numeric rem values below are therefore the desired pixel value
   itself (e.g. `padding: 14rem` = 14px). Borders and avatar sizes are
   kept in px because rem and px are equivalent here.

   Colour palette: every card background is a CSS custom property so each
   edition (ELA-26, ELA-27, …) can override them via an inline <style>
   block injected by agenda/page-shell. Track border-left colours stay
   hard-coded — they're a content-level taxonomy, not edition decor. */

:root {
    --colour-session:    #fafafa;
    --colour-plenary:    #f0f0f0;
    --colour-break:      #f5f5f5;
    --colour-translated: #e6f0ff;

    --colour-track-hed:   #fafafa;
    --colour-track-pol:   #fafafa;
    --colour-track-ait:   #fafafa;
    --colour-track-ysk:   #fafafa;
    --colour-track-edt:   #fafafa;
    --colour-track-tea:   #fafafa;
    --colour-track-sch:   #fafafa;
    --colour-track-inc:   #fafafa;
    --colour-track-ped:   #fafafa;
    --colour-track-ses:   #fafafa;
    --colour-track-bil:   #fefbe6;
    --colour-track-other: #fafafa;
}

/* ---------- Header ---------- */
.agenda-header { margin: 16rem 0 32rem; }
.agenda-header .h1 { margin: 0 0 6rem; }
.agenda-meta { color: #555; font-size: 15rem; margin: 0 0 13rem; }
.agenda-archived-banner {
    display: inline-block;
    background: #f5f5f5;
    color: #555;
    padding: 6rem 13rem;
    border-radius: 3px;
    font-size: 14rem;
    margin-top: 8rem;
}
.agenda-empty { color: #999; padding: 32rem 0; }

/* ---------- Day & social headers ---------- */
.programme_day {
    font-size: 22rem;
    font-weight: 700;
    margin: 40rem 0 16rem;
    padding-bottom: 6rem;
    border-bottom: 2px solid #222;
    color: #111;
}
.programme_social {
    font-size: 15rem;
    font-weight: 500;
    color: #666;
    margin: 19rem 0 10rem;
    padding: 6rem 13rem;
    background: var(--colour-break);
    border-left: 3px solid #ccc;
    border-radius: 2px;
}
.programme_social__time {
    margin-left: 6rem;
    color: #999;
    font-weight: 400;
}

/* ---------- Programme row (responsive grid) ---------- */
.programme-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200rem, 1fr));
    gap: 13rem;
    margin: 0 0 22rem;
}
.programme-row--workshops {
    grid-template-columns: repeat(auto-fill, minmax(200rem, 1fr));
}

/* ---------- Session card ----------
   Padding is exposed as custom properties so the absolutely-positioned
   badge in the top-right corner stays vertically aligned with the
   session-code in the top-left across every card variant (workshops,
   plenaries, future modifiers). Override `--pi-pad-y` / `--pi-pad-x`
   on the variant selector — never re-set `padding` on .programme-item. */
.programme-item {
    --pi-pad-y: 14rem;
    --pi-pad-x: 16rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding: var(--pi-pad-y) var(--pi-pad-x);
    border-radius: 4px;
    background: var(--colour-session);
    border-left: 4px solid #888;
    color: inherit;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    position: relative;
}
.programme-item {
    cursor: pointer;
}
.programme-item:hover,
.programme-item:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
    text-decoration: none;
}
.programme-item:focus:not(:focus-visible) { outline: none; }
.programme-item__code {
    font-size: 12rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #555;
    text-transform: uppercase;    text-decoration: none;
    display: inline-block;
}
.programme-item__code:hover {
    text-decoration: underline;
    color: #2c5aa0;}
.programme-item__title {
    font-size: 15rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
}
.programme-item__speakers {
    list-style: none;
    margin: 5rem 0 0;
    padding: 0;
    font-size: 13rem;
    color: #555;
    line-height: 1.35;
}
.programme-item__speakers li { margin: 2rem 0; }
.programme-item__speakers strong { font-weight: 600; color: #222; }
.programme-item__role {
    display: inline-block;
    background: #fff7c2;
    color: #5a4a00;
    padding: 0 5rem;
    border-radius: 2px;
    font-size: 11rem;
    margin-left: 3rem;
}

/* Badges (cancelled, EN/FR) — anchored to the same top/right padding
   as the rest of the card content via the shared custom properties. */
.programme-item__badge {
    position: absolute;
    top: var(--pi-pad-y);
    right: var(--pi-pad-x);
    font-size: 10rem;
    padding: 2rem 6rem;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.programme-item__badge--translated { background: #e6f0ff; color: #234a8a; }
.programme-item__badge--cancelled  { background: #ffe6e6; color: #a00; }
.programme-item.is-cancelled .programme-item__title { text-decoration: line-through; opacity: 0.7; }

/* ---------- Track colours (theme_*) ----------
   border-left = content taxonomy (hard-coded palette).
   background  = edition-level CSS custom property, overridable per edition.
   Order matters below: more-specific cascading rules (plenary, translated)
   come AFTER the track rules so they win at equal specificity. */
.theme_HED     { border-left-color: #2c5aa0; background: var(--colour-track-hed); }
.theme_POL     { border-left-color: #b94e4e; background: var(--colour-track-pol); }
.theme_AIT     { border-left-color: #6b3fa0; background: var(--colour-track-ait); }
.theme_YSK     { border-left-color: #e08e0b; background: var(--colour-track-ysk); }
.theme_EDT     { border-left-color: #117a65; background: var(--colour-track-edt); }
.theme_TEA     { border-left-color: #d57f6e; background: var(--colour-track-tea); }
.theme_SCH     { border-left-color: #c2a13a; background: var(--colour-track-sch); }
.theme_INC     { border-left-color: #884ea0; background: var(--colour-track-inc); }
.theme_PED     { border-left-color: #1f6f8b; background: var(--colour-track-ped); }
.theme_SES     { border-left-color: #777;    background: var(--colour-track-ses); }
.theme_BIL     { border-left-color: #d4b500; background: var(--colour-track-bil); }
.theme_PLENARY { border-left-color: #111; }
.theme_OTHER   { border-left-color: #aaa;    background: var(--colour-track-other); }

/* Plenary cards take the full row and use the plenary background.
   Specificity (.programme-item.type_plenary) beats single .theme_* rules. */
.programme-item.type_plenary {
    grid-column: 1 / -1;
    background: var(--colour-plenary);
}
.programme-item.type_plenary .programme-item__title { font-size: 17rem; }

/* Simultaneously translated overrides track and plenary backgrounds.
   Same specificity as type_plenary, but declared later → wins. */
.programme-item.is-translated { background: var(--colour-translated); }

/* Workshops slightly more compact — override the padding variables only,
   so the badge anchor stays in sync automatically. */
.programme-row--workshops .programme-item {
    --pi-pad-y: 11rem;
    --pi-pad-x: 13rem;
}

/* ---------- Session detail page ---------- */
.session-back { margin-bottom: 16rem; font-size: 14rem; }
.session-back a { color: #666; text-decoration: none; }
.session-back a:hover { text-decoration: underline; }

.section--session .section__inner.session-detail {
    max-width: 880rem;
}

.session-header { margin-bottom: 24rem; }
.session-header .h1 { margin: 6rem 0 10rem; line-height: 1.25; }
.session-track-badge {
    display: inline-block;
    padding: 3rem 10rem;
    background: #eee;
    color: #333;
    font-size: 11rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 2px;
    margin-right: 6rem;
    border-left: 4px solid #888;
}
.session-code {
    display: inline-block;
    font-size: 12rem;
    color: #666;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.session-schedule {
    color: #444;
    margin: 6rem 0;
    font-size: 15rem;
}
.session-day { font-weight: 600; }
.session-time { margin-left: 6rem; color: #666; }
.session-room, .session-translated, .session-keywords, .session-theme,
.session-meta-row {
    margin: 6rem 0;
    color: #555;
    font-size: 14rem;
}
.session-translated::before { content: "🎧 "; }

.session-cancelled-banner {
    background: #ffe6e6;
    color: #a00;
    border-left: 4px solid #a00;
    padding: 13rem 16rem;
    margin: 16rem 0;
    font-weight: 600;
}

.session-description { margin: 24rem 0; line-height: 1.6; }
.session-description-long { margin-top: 16rem; color: #444; }

.session-speakers h2,
.session-materials h2 { margin-top: 32rem; font-size: 19rem; }
.session-speakers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280rem, 1fr));
    gap: 16rem;
}
.session-speaker-item {
    display: flex;
    gap: 13rem;
    align-items: flex-start;
    padding: 10rem 0;
    border-bottom: 1px solid #eee;
}
.session-speaker-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.session-speaker-meta { flex: 1; min-width: 0; }
.session-speaker-name { margin: 0; font-weight: 600; }
.session-speaker-name a { color: inherit; text-decoration: none; }
.session-speaker-name a:hover { text-decoration: underline; }
.session-speaker-role {
    display: inline-block;
    background: #fff7c2;
    color: #5a4a00;
    padding: 0 5rem;
    border-radius: 2px;
    font-size: 11rem;
    margin-left: 3rem;
}
.session-speaker-affiliation { margin: 2rem 0; color: #666; font-size: 14rem; }
.session-speaker-presentation { margin: 3rem 0 0; font-style: italic; color: #555; font-size: 14rem; }

/* ---------- Mobile ----------
   Media queries use `em` (not rem) so they respect the user's browser
   font-size instead of the project's 6.25% root override. 37.5em ≈ 600px
   at the browser default. */
@media (max-width: 37.5em) {
    .programme-row { grid-template-columns: 1fr; }
    .programme_day { font-size: 19rem; }
    .session-header .h1 { font-size: 22rem; }
}

/* ---------- Pre-Conference Workshops view ---------- */
.agenda-workshops__section { margin-bottom: 32rem; }
.agenda-workshops__section .programme_day {
    /* Reuse the day-header styling but make it slightly less imposing —
       these aren't days, they're workshop categories. */
    font-size: 19rem;
    border-bottom-width: 1px;
    border-bottom-color: #999;
}
.agenda-workshops__cta {
    margin: 40rem 0 16rem;
    text-align: center;
}
.agenda-workshops__cta-button {
    display: inline-block;
    padding: 13rem 26rem;
    background: #2c5aa0;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 14rem;
    transition: background 0.12s ease;
}
.agenda-workshops__cta-button:hover {
    background: #1e4378;
    text-decoration: none;
    color: #fff;
}

/* ---------- Session modal ----------
   Mirrors .speaker-modal patterns from speakers.css. The "Back to programme"
   link is omitted from the modal body — the close button (×, ESC, backdrop)
   replaces that affordance inside the modal context. */
.session-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.session-modal[hidden] { display: none; }
.session-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.session-modal__panel {
    position: relative;
    background: #fff;
    max-width: 720rem;
    width: calc(100% - 32rem);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 32rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.session-modal__close {
    position: absolute;
    top: 8rem;
    right: 8rem;
    background: transparent;
    border: 0;
    font-size: 29rem;
    line-height: 1;
    cursor: pointer;
    width: 35rem;
    height: 35rem;
}
.session-modal__close:hover { color: #c00; }
.session-modal__loading,
.session-modal__error {
    text-align: center;
    padding: 32rem;
    color: #666;
}
.session-modal__header { margin-bottom: 19rem; }
.session-modal__title { margin: 6rem 0 10rem; line-height: 1.25; font-size: 22rem; }
.session-modal__detail-link {
    border-top: 1px solid #eee;
    padding-top: 16rem;
    margin-top: 16rem;
    text-align: right;
}
body.session-modal-open { overflow: hidden; }

/* ---------- Print ---------- */
@media print {
    .programme-item { break-inside: avoid; box-shadow: none; }
    .programme-item:hover { transform: none; box-shadow: none; }
    .session-back, .speaker-modal, .session-modal { display: none; }
}
