/* Public event detail (/events/{id}): invitation panel, registration desk rail, inline sections */
.evd {
    --evd-ink: #0f172a;
    --evd-muted: #64748b;
    --evd-line: rgba(15, 23, 42, 0.08);
    --evd-surface: #f8fafc;
    --evd-accent: var(--primary, #e11d48);
    --evd-green: #047857;
    --evd-red: #b91c1c;
    padding-block: 2.5rem 3rem;
}

/* aiz-core.css sets section { padding: 60px 0; } — kill that on this page only */
.evd section {
    padding: 0;
    padding-bottom: 1.25rem;
    padding-top: 1.25rem;
}

@media (max-width: 991.98px) {
    .evd {
        padding-top: calc(2.25rem + env(safe-area-inset-top, 0px));
    }
}

.evd h2,
.evd h3 {
    text-wrap: balance;
}

/* Breadcrumb */
.evd-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--evd-muted);
    margin-bottom: 0.85rem;
}

.evd-crumbs a {
    color: var(--evd-muted);
    font-weight: 600;
}

.evd-crumbs a:hover {
    color: var(--evd-accent);
}

.evd-crumbs span[aria-current] {
    color: var(--evd-ink);
    overflow-wrap: anywhere;
}

/* Invitation panel: the page signature, a printed patrika head rendered in HTML */
.evd-invite {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid var(--evd-line);
    border-top: 3px solid var(--evd-accent);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .evd-invite {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    }
}

.evd-invite__banner {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #eef2f7;
    overflow: hidden;
}

@media (min-width: 992px) {
    .evd-invite__banner {
        aspect-ratio: auto;
        min-height: 100%;
    }
}

.evd-invite__img,
.evd-invite__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.evd-invite__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
}

.evd-invite__face {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.25rem 1.15rem 1.35rem;
}

@media (min-width: 992px) {
    .evd-invite__face {
        padding: 1.9rem 2rem;
    }
}

.evd-eyebrow {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--evd-accent);
    margin: 0 0 0.4rem;
}

.evd-title {
    font-size: clamp(1.45rem, 3.4vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--evd-ink);
    margin: 0 0 0.7rem;
    overflow-wrap: anywhere;
}

.evd-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    padding: 0.25rem 0.65rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.evd-status--upcoming {
    background: var(--evd-green);
    color: #fff;
}

.evd-status--past {
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
}

.evd-status--cancelled {
    background: #dc2626;
    color: #fff;
}

/* Facts row: date block echoes the tear-off on the listing cards */
.evd-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    margin: 0 0 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--evd-line);
    border-bottom: 1px solid var(--evd-line);
}

.evd-when {
    text-align: center;
    padding-right: 0.9rem;
    border-right: 1px solid var(--evd-line);
    font-variant-numeric: tabular-nums;
}

.evd-when__day {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--evd-ink);
}

.evd-when__month {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--evd-accent);
}

.evd-when__weekday {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--evd-muted);
}

.evd-lines {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    align-self: center;
}

.evd-lines div {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #334155;
}

.evd-lines i {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    font-size: 1.05rem;
    color: #94a3b8;
}

.evd-lines span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.evd-lines time {
    font-variant-numeric: tabular-nums;
}

/* Countdown, driven by the inline script */
.evd-countdown {
    min-height: 1.25rem;
    font-size: 0.82rem;
    color: var(--evd-muted);
}

.countdown-timer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.9rem;
}

.countdown-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.countdown-item strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--evd-ink);
}

.countdown-item small {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--evd-muted);
}

/* Two-column body */
.evd-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .evd-layout {
        grid-template-columns: minmax(0, 1fr) 21rem;
        gap: 2rem;
        align-items: start;
    }
}

.evd-main {
    min-width: 0;
}

.evd-section {
    /* padding-bottom: 1.25rem; */
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--evd-line);
    scroll-margin-top: 6rem;
}

.evd-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.evd-section__title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--evd-ink);
    margin: 0 0 0.9rem;
}

/* Pill tabs over the attendees and photos panes */
.evd-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1rem;
    padding: 0;
}

.evd-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    background: var(--evd-surface);
    border: 1px solid var(--evd-line);
    border-radius: 999px;
    touch-action: manipulation;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.evd-tab:hover {
    color: var(--evd-ink);
    background: #f1f5f9;
    text-decoration: none;
}

.evd-tab.active,
.evd-tab.active:hover {
    color: #fff;
    background: var(--evd-accent);
    border-color: var(--evd-accent);
}

.evd-tab__count {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--evd-muted);
    font-variant-numeric: tabular-nums;
}

.evd-tab.active .evd-tab__count {
    color: rgba(255, 255, 255, 0.85);
}

.evd-section__count {
    margin-left: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--evd-muted);
    font-variant-numeric: tabular-nums;
}

/* Organiser-written description */
.evd-prose {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #475569;
    overflow-wrap: anywhere;
}

.evd-prose p,
.evd-prose ul,
.evd-prose ol,
.evd-prose table {
    margin-bottom: 0.85rem;
}

.evd-prose :last-child {
    margin-bottom: 0;
}

.evd-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.evd-prose table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

.evd-prose a {
    color: var(--evd-accent);
    font-weight: 600;
}

.evd-empty-note {
    font-size: 0.88rem;
    color: var(--evd-muted);
    margin: 0;
}

/* Fact list used by rules, venue and contact */
.evd-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
    gap: 0.75rem;
    margin: 0;
}

.evd-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    background: var(--evd-surface);
    border: 1px solid var(--evd-line);
    border-radius: 10px;
}

.evd-item i {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    font-size: 1.15rem;
    color: var(--evd-accent);
}

.evd-item__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--evd-muted);
    margin-bottom: 0.1rem;
}

.evd-item__value {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--evd-ink);
    overflow-wrap: anywhere;
}

.evd-item__value a {
    color: var(--evd-ink);
    border-bottom: 1px solid rgba(225, 29, 72, 0.35);
}

.evd-item__value a:hover {
    color: var(--evd-accent);
}

.evd-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--evd-accent);
}

/* Cancelled notice */
.evd-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
    background: #fef2f2;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-left: 4px solid #dc2626;
    border-radius: 10px;
}

.evd-alert i {
    flex: 0 0 auto;
    font-size: 1.3rem;
    color: #dc2626;
}

.evd-alert h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #991b1b;
    margin: 0 0 0.2rem;
}

.evd-alert p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #7f1d1d;
    margin: 0;
}

.evd-alert small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgba(127, 29, 29, 0.75);
}

/* Attendees */
.evd-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr));
    gap: 0.75rem;
}

.evd-person {
    min-width: 0;
    padding: 0.85rem 0.7rem;
    text-align: center;
    background: #fff;
    border: 1px solid var(--evd-line);
    border-radius: 12px;
}

.evd-person__avatar,
.evd-person__initial {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.evd-person__initial {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--evd-accent);
}

.attendee-image-blur {
    filter: blur(7px);
}

.evd-person__name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--evd-ink);
    margin: 0 0 0.15rem;
    overflow-wrap: anywhere;
}

.evd-person__meta {
    display: block;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--evd-muted);
    overflow-wrap: anywhere;
}

.evd-people-more {
    margin: 0.9rem 0 0;
    font-size: 0.82rem;
    color: var(--evd-muted);
}

/* Gallery */
.evd-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr));
    gap: 0.6rem;
}

.evd-shot {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    background: #eef2f7;
    border: 0;
    border-radius: 10px;
    cursor: zoom-in;
    touch-action: manipulation;
}

.evd-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.evd-shot:hover img {
    transform: scale(1.04);
}

.evd-shot__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: #fff;
    background: rgba(15, 23, 42, 0.35);
}

.evd-more-shots {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.9rem;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--evd-accent);
    background: #fff;
    border: 1px solid rgba(225, 29, 72, 0.35);
    border-radius: 999px;
    touch-action: manipulation;
}

.evd-more-shots:hover {
    color: #fff;
    background: var(--evd-accent);
}

/* Registration desk */
.evd-rail {
    min-width: 0;
}

/* Fee and the register button lead on small screens, before the long sections */
@media (max-width: 991.98px) {
    .evd-rail {
        order: -1;
    }
}

@media (min-width: 992px) {
    .evd-rail {
        position: sticky;
        top: var(--header-height, 110px);
    }
}

.evd-desk {
    padding: 1.15rem 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid var(--evd-line);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.evd-desk__label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--evd-muted);
    margin: 0 0 0.2rem;
}

.evd-desk__fee {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--evd-ink);
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.evd-desk__fee--free {
    color: var(--evd-green);
}

.evd-desk__fee-note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--evd-muted);
}

.evd-desk__facts {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0;
    padding: 0.9rem 0;
    border-top: 1px solid var(--evd-line);
    border-bottom: 1px solid var(--evd-line);
}

.evd-desk__facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.82rem;
}

.evd-desk__facts dt {
    color: var(--evd-muted);
    font-weight: 500;
    margin: 0;
}

.evd-desk__facts dd {
    margin: 0;
    font-weight: 700;
    color: var(--evd-ink);
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.evd-desk__facts .is-low {
    color: var(--evd-red);
}

.evd-desk__facts .is-open {
    color: var(--evd-green);
}

.evd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid transparent;
    text-align: center;
    touch-action: manipulation;
    transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.evd-btn + .evd-btn {
    margin-top: 0.55rem;
}

.evd-btn--primary {
    color: #fff;
    background: var(--evd-accent);
}

.evd-btn--primary:hover {
    color: #fff;
    filter: brightness(0.94);
}

.evd-btn--ghost {
    color: var(--evd-ink);
    background: #fff;
    border-color: var(--evd-line);
}

.evd-btn--ghost:hover {
    color: var(--evd-ink);
    background: var(--evd-surface);
}

.evd-btn--muted {
    color: var(--evd-muted);
    background: var(--evd-surface);
    border-color: var(--evd-line);
    cursor: not-allowed;
}

.evd-desk__note {
    margin: 0.8rem 0 0;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--evd-muted);
}

.evd-desk__note a {
    color: var(--evd-accent);
    font-weight: 600;
}

.evd-inline-link {
    color: var(--evd-accent);
    font-weight: 600;
}

/* Focus states */
.evd a:focus-visible,
.evd button:focus-visible,
.lightbox-modal button:focus-visible {
    outline: 2px solid var(--evd-accent);
    outline-offset: 2px;
}

/* Gallery lightbox */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.94);
    overscroll-behavior: contain;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.lightbox-image.zoomed {
    cursor: zoom-out;
    transform: scale(2);
}

.lightbox-video {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.75rem;
    line-height: 1;
    z-index: 10000;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.75rem;
    font-size: 1.35rem;
}

.lightbox-prev {
    left: 0.75rem;
}

.lightbox-next {
    right: 0.75rem;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(15, 23, 42, 0.85);
}

@media (prefers-reduced-motion: reduce) {
    .evd-shot img,
    .lightbox-image,
    .evd-btn,
    .evd-tab {
        transition: none;
    }

    .evd-shot:hover img {
        transform: none;
    }
}
