/*
 * ShopLeaf events (/events, /events/slug, /events/slug/checkin). Fonts and text colour come from the
 * site; surfaces are tints of the text colour so light and dark templates both work.
 */
.sev {
    --sev-accent: var(--primary, #1b810d);
    --sev-muted: #6b6f76;
    --sev-line: rgba(128, 128, 128, 0.28);
    --sev-card: rgba(128, 128, 128, 0.06);
    max-width: 1200px; margin: 0 auto; padding: calc(var(--sl-header-offset, 0px) + 36px) 20px 80px;
    box-sizing: border-box; color: inherit; text-align: left; font-size: 15px; line-height: 1.55;
}
.sev *, .sev *::before, .sev *::after { box-sizing: border-box; }
.sev h1 { margin: 0; line-height: 1.15; }
.sev a { color: inherit; }
.sev-head { margin-bottom: 18px; }
.sev-empty { color: var(--sev-muted); padding: 30px 0; }
.sev-muted { color: var(--sev-muted); font-size: 13px; }
.sev-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin: 0 6px 6px 0;
    --sev-tag: var(--sev-accent); color: var(--sev-tag); background: color-mix(in srgb, var(--sev-tag) 12%, transparent); }
.sev-tag.cancel { --sev-tag: #b42318; }

/* List */
.sev-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sev-chips a { text-decoration: none; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--sev-line); }
.sev-chips a.on { background: var(--sev-accent); border-color: var(--sev-accent); color: #fff; }
.sev-month { font-size: 20px; margin: 30px 0 12px; }
.sev-list { display: grid; gap: 12px; }
.sev-item { display: grid; grid-template-columns: 70px minmax(0, 1fr) 160px; gap: 18px; align-items: center; text-decoration: none; padding: 14px; border: 1px solid var(--sev-line); border-radius: 14px; transition: border-color 0.2s, transform 0.2s; }
.sev-item:hover { border-color: var(--sev-accent); transform: translateY(-1px); }
.sev-item.cancelled h3 { text-decoration: line-through; opacity: .7; }
.sev-date { text-align: center; border-radius: 12px; background: var(--sev-card); padding: 8px 0; line-height: 1.1; }
.sev-date span, .sev-date small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--sev-muted); }
.sev-date b { display: block; font-size: 28px; margin: 2px 0; }
.sev-info h3 { font-size: 18px; margin: 0 0 2px; }
.sev-meta { font-size: 14px; color: var(--sev-muted); }
.sev-info p { margin: 6px 0 0; font-size: 14px; }
.sev-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; display: block; }
.sev-item:not(:has(img)) { grid-template-columns: 70px minmax(0, 1fr); }

/* Event */
.sev-hero { border-radius: 16px; overflow: hidden; margin-bottom: 22px; background: var(--sev-card); }
.sev-hero img { display: block; width: 100%; height: clamp(200px, 36vw, 440px); object-fit: cover; }
.sev-title { margin-bottom: 20px; }
.sev-title p { font-size: 18px; color: var(--sev-muted); margin: 8px 0 0; max-width: 760px; }
.sev-banner { padding: 12px 16px; border-radius: 10px; background: #fdecea; color: #b42318; font-weight: 700; margin-bottom: 20px; }
.sev-banner.quiet { background: var(--sev-card); color: inherit; }
.sev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.sev-html { line-height: 1.7; overflow-wrap: break-word; }
.sev-html > :first-child { margin-top: 0; }
.sev-html img, .sev-html video, .sev-html iframe { max-width: 100%; height: auto; }
.sev-fields { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 26px 0 0; padding: 18px 20px; border-radius: 14px; background: var(--sev-card); }
.sev-fields dt { font-weight: 700; }
.sev-fields dd { margin: 0; }
.sev-sub { font-size: 20px; margin: 32px 0 4px; }
.sev-repeat { color: var(--sev-muted); margin: 0 0 10px; }
.sev-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sev-dates a { display: block; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--sev-line); text-decoration: none; }
.sev-dates a.on { border-color: var(--sev-accent); font-weight: 700; }
.sev-side { display: grid; gap: 14px; position: sticky; top: calc(var(--sl-header-offset, 0px) + 20px); }
.sev-card { border: 1px solid var(--sev-line); border-radius: 14px; padding: 16px 18px; }
.sev-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--sev-muted); margin: 0 0 8px; }
.sev-card p { margin: 0 0 4px; }
.sev-when { font-weight: 700; font-size: 17px; }
.sev-cal { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sev-cal a, .sev-link { font-size: 14px; font-weight: 700; color: var(--sev-accent); text-decoration: none; }
.sev-cal a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--sev-line); }
.sev-link { display: inline-block; margin-top: 6px; }
.sev-map { display: block; width: 100%; height: 200px; border: 0; border-radius: 10px; margin-top: 12px; background: var(--sev-card); }
.sev-online { margin-top: 10px !important; }
.sev-online a { color: var(--sev-accent); font-weight: 700; }
.sev-button { display: block; text-align: center; margin-top: 10px; padding: 12px 18px; border-radius: 10px; background: var(--sev-accent); color: #fff !important; font-weight: 800; text-decoration: none; border: 0; width: 100%; font-size: 16px; cursor: pointer; font-family: inherit; }
.sev-button:disabled { opacity: .5; cursor: default; }
.sev-checkin { border-color: var(--sev-accent); }

/* Check-in */
.sev-checkin-page { max-width: 460px; margin: 0 auto; }
.sev-checkin-page h1 { margin: 10px 0 12px; }
.sev-back { font-size: 14px; color: var(--sev-muted) !important; text-decoration: none; }
.sev-form label { display: block; font-size: 14px; font-weight: 700; margin: 14px 0 4px; text-transform: none; color: inherit; }
.sev-form input { width: 100%; font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--sev-line); background: transparent; color: inherit; height: auto; margin: 0; }
.sev-form .sev-button { margin-top: 18px; }
.sev-result { margin-top: 14px; font-weight: 700; }
.sev-result:empty { display: none; }
.sev-result.ok { color: #1b810d; }
.sev-result.bad { color: #b42318; }

@media (max-width: 900px) {
    .sev-layout { grid-template-columns: 1fr; }
    .sev-side { position: static; }
}
@media (max-width: 640px) {
    .sev-item, .sev-item:not(:has(img)) { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
    .sev-item img { display: none; }
    .sev-fields { grid-template-columns: 1fr; gap: 2px; }
    .sev-fields dd { margin-bottom: 8px; }
}
