/* One event, for its host: the event header, its sub-pages (overview, orders, guests, door and box office, add-ons, messages), refunds (redesign phase 2). */
/* Builder B's file: overrides app.css here, never there. Calm type, hairlines instead of boxes, one pink action per view. */

/* ── Event header (Shared/EventHeader.razor) ─────────────────────────────────────────────── */
.ev-head { margin: 0 0 1.1rem; }
.ev-head .host-org { margin-bottom: .6rem; }
/* The host frame's width and top (host-shell.css .host-shell), so moving from the dashboard to an event doesn't jump. */
.ev-page, .container.dash:has(> .ev-head) { --container: var(--w-app); }
.ev-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem 1.5rem; }
.ev-head-text { min-width: 0; flex: 1 1 22rem; }
.dash .ev-title, .ev-title { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin: 0;
    font-size: var(--fs-title); font-weight: var(--fw-title); letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
/* Date on one line, the link and View on the next, at every width: no leading dots. */
.ev-link { display: flex; flex-direction: column; gap: .15rem; margin: .45rem 0 0; font-size: var(--fs-small); color: var(--lp-muted); }
.ev-where { display: inline-flex; align-items: baseline; gap: .5rem; min-width: 0; max-width: 100%; white-space: nowrap; }
.ev-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ev-link a { color: var(--lp-brand-text); font-weight: 600; text-decoration: none; }
.ev-link a:hover { text-decoration: underline; }
.ev-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ev-inline-form { margin: 0; }

/* the "⋯" menu: a plain list under a button, works without JS (host-event.js closes it on a click elsewhere) */
.ev-more { position: relative; }
.ev-more > summary { list-style: none; cursor: pointer; min-width: 2.75rem; font-size: var(--fs-subhead); line-height: 1; letter-spacing: .05em; }
.ev-more > summary::-webkit-details-marker { display: none; }
.ev-more-menu { position: absolute; right: 0; z-index: 30; display: grid; min-width: 230px; margin-top: .35rem; padding: .35rem;
    border: 1px solid var(--lp-line); border-radius: 12px; background: var(--lp-bg); box-shadow: 0 12px 32px -12px var(--shadow); }
.ev-more-menu form { margin: 0; display: grid; }
.ev-more-menu a, .ev-more-menu button { display: block; width: 100%; padding: .6rem .75rem; border: 0; border-radius: 8px; background: none;
    font: inherit; font-size: var(--fs-body); text-align: left; color: var(--lp-ink); text-decoration: none; cursor: pointer; }
.ev-more-menu a:hover, .ev-more-menu a:focus-visible, .ev-more-menu button:hover, .ev-more-menu button:focus-visible { background: var(--lp-surface); }
.ev-more-menu .ev-more-danger { color: var(--danger-text); margin-top: .25rem; border-top: 1px solid var(--lp-line); border-radius: 0 0 8px 8px; }

/* draft: what publishing still needs */
.ev-ready { display: grid; gap: .7rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--lp-line); }
.ev-checks { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0; padding: 0; font-size: var(--fs-small); color: var(--lp-muted); }
.ev-checks li { display: inline-flex; align-items: center; gap: .4rem; }
.ev-checks li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid currentColor; box-sizing: border-box; }
.ev-checks li.is-done::before { border: 0; background: var(--lp-live)
    url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 14 14%27 fill=%27none%27 stroke=%27white%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3.5 7.2l2.3 2.3 4.7-4.9%27/%3E%3C/svg%3E") center / 14px no-repeat; }
.ev-checks a { font-weight: 600; color: var(--lp-brand-text); }
.ev-check-note { font-size: var(--fs-micro); }
.ev-terms { margin: 0; }
.ev-phone { display: grid; gap: .35rem; margin: 0; max-width: 34rem; }
.ev-phone label { font-weight: 600; font-size: var(--fs-small); }
.ev-phone label .fine-print { font-weight: 400; margin: 0 0 0 .3rem; }
.ev-phone-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.ev-phone-row input { flex: 1 1 14rem; max-width: 20rem; font: inherit; padding: .6rem .75rem; border: 1px solid var(--lp-line); border-radius: var(--radius-sm); background: var(--lp-bg); color: var(--lp-ink); }
.ev-head .form-error, .ev-head .form-success, .ev-head .ev-note { margin: .9rem 0 0; }

/* ── Event tabs: one row, scrolls sideways on a phone ─────────── */
.ev-tabs { display: flex; gap: 1.5rem; margin: 0 0 1.6rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--lp-line); }
.ev-tabs::-webkit-scrollbar { display: none; }
.ev-tabs a { flex: none; padding: .65rem 0; margin-bottom: -1px; white-space: nowrap; font-weight: 600; font-size: var(--fs-body); color: var(--lp-muted);
    text-decoration: none; border-bottom: 2px solid transparent; }
.ev-tabs a:hover { color: var(--lp-ink); }
.ev-tabs a[aria-current="page"] { color: var(--lp-ink); border-bottom-color: var(--lp-brand); }
@media (max-width: 760px) {
    .ev-tabs { gap: 1.2rem; padding-right: 1rem; }
}

/* ── Page parts ─────────────────────────────────────────────────────────────────────────── */
.ev-page-title { margin: 0 0 .6rem; font-size: var(--fs-heading); font-weight: var(--fw-strong); letter-spacing: -.015em; }
.ev-back { display: inline-block; margin: 0 0 .6rem; font-size: var(--fs-small); font-weight: 600; color: var(--lp-muted); text-decoration: none; }
.ev-back:hover { color: var(--lp-ink); }
.ev-narrow { max-width: var(--w-read); }
.ev-block { margin: 0 0 2rem; }
.ev-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .6rem; }
.ev-block-title { margin: 0 0 .5rem; font-size: var(--fs-heading); font-weight: var(--fw-strong); }
h3.ev-block-title { font-size: var(--fs-subhead); }
.ev-block-head .ev-block-title { margin: 0; }
.ev-note { margin: 0 0 1rem; font-weight: 600; }
.ev-nowrap { white-space: nowrap; }
.ev-sent-title { margin-top: 2rem; }

/* figures: plain numbers on a hairline, no boxes */
.ev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 2rem; margin: 0 0 2rem; }
.ev-stat { display: grid; align-content: start; gap: .15rem; padding: .9rem 0; border-top: 1px solid var(--lp-line); }
.ev-stat-label { font-size: var(--fs-small); color: var(--lp-muted); }
.ev-stat-value { font-size: var(--fs-stat); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ev-stat-value small { font-size: var(--fs-body); font-weight: 500; letter-spacing: 0; color: var(--lp-muted); }
.ev-stat-text { font-size: var(--fs-heading); letter-spacing: -.01em; }
.ev-stat-note { font-size: var(--fs-small); color: var(--lp-muted); }

/* money lines (sales summary, tickets, guests sent) */
.ev-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lp-line); font-variant-numeric: tabular-nums; }
.ev-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--lp-line); }
.ev-lines li > span:last-child { white-space: nowrap; text-align: right; }
.ev-lines .fine-print { margin: 0 0 0 .35rem; }
.ev-lines li.is-quiet { color: var(--lp-muted); }
.ev-lines li.is-total { font-weight: 700; font-size: var(--fs-body); border-bottom: 0; }
.ev-report { max-width: var(--w-read); }
.ev-lines-aside { margin-top: 1rem; font-size: var(--fs-small); }
.ev-by-type { margin-top: .6rem; }
.ev-by-type summary { cursor: pointer; font-weight: 600; font-size: var(--fs-small); color: var(--lp-muted); padding: .3rem 0; }
.ev-by-type .ev-lines { margin-top: .4rem; }

/* fan-funded and still pledging: how close it is, a figure on a hairline like .ev-stat */
.ev-goal { margin: 0 0 1.5rem; padding: .9rem 0 0; border-top: 1px solid var(--lp-line); }
.ev-goal-bar, .ev-goal-foot { max-width: var(--w-read); }
.ev-goal-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; margin: 0 0 .7rem; }
.ev-goal-line strong { font-size: var(--fs-heading); font-weight: 600; letter-spacing: -.02em; }
.ev-goal-line span { color: var(--lp-muted); font-size: var(--fs-body); }
.ev-goal-bar { height: 6px; border-radius: 999px; background: var(--lp-surface-2); overflow: hidden; }
.ev-goal-bar span { display: block; height: 100%; border-radius: inherit; background: var(--lp-brand); }
.ev-goal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin: .7rem 0 0; font-size: var(--fs-small); color: var(--lp-muted); }
.ev-goal-foot a { font-weight: 600; color: var(--lp-brand-text); }

/* a cancelled event: what happened */
.ev-cancelled { margin: 0 0 2rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--lp-surface); max-width: var(--w-read); }
.ev-cancelled h2 { margin: 0 0 .5rem; font-size: var(--fs-subhead); font-weight: 600; }
.ev-facts { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; line-height: 1.5; }
.ev-facts .is-warn { color: var(--warn-text); font-weight: 600; }

/* door tab: one row per thing to open */
.ev-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lp-line); max-width: var(--w-read); }
.ev-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--lp-line); }
.ev-rows li > div { display: grid; gap: .2rem; flex: 1 1 18rem; }
.ev-rows .fine-print { margin: 0; }

/* cancel event: say what happens, one red button */
.ev-confirm h2 { margin: 0 0 .8rem; font-size: var(--fs-heading); font-weight: var(--fw-strong); }
.ev-confirm .ev-facts { margin-bottom: 1rem; }
.ev-confirm-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ── Orders (Shared/EventOrders.razor) ─────────────────────────────────────────────────────── */
.ev-orders-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1rem; }
.ev-search { flex: 1 1 20rem; max-width: 30rem; }
.ev-search input { flex: 1; min-width: 0; }
.ev-quiet-link { font-size: var(--fs-small); font-weight: 600; color: var(--lp-muted); }
.ev-orders-table .o-buyer { min-width: 12rem; }
.o-count { display: none; color: var(--lp-muted); font-weight: 400; }
.o-email, .o-date { display: block; font-size: var(--fs-small); color: var(--lp-muted); overflow-wrap: anywhere; }
.o-buyer .pill, .o-ref .pill { margin-top: .3rem; }
.o-ref-code { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-orders-table .row-actions .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
@media (max-width: 639.98px) {
    /* a phone: each order is a card (name and ticket count; email, order and date in fine print; status; actions) */
    .ev-orders-table, .ev-orders-table tbody, .ev-orders-table tr, .ev-orders-table td { display: block; }
    .ev-orders-table thead { display: none; }
    .ev-orders-table tr { display: grid; gap: .25rem; padding: .9rem 0; border-bottom: 1px solid var(--lp-line); }
    .ev-orders-table td { padding: 0; border: 0; text-align: left; }
    .ev-orders-table .o-tickets, .ev-orders-table .o-in, .ev-orders-table .o-total { display: none; }
    .ev-orders-table .o-count { display: inline; }
    .ev-orders-table .o-ref { font-size: var(--fs-small); color: var(--lp-muted); }
    .ev-orders-table .o-ref-code, .ev-orders-table .o-date { display: inline; }
    .ev-orders-table .o-date::before { content: " · "; }
    .ev-orders-table .o-status:empty { display: none; }
    .ev-orders-table .row-actions .actions { justify-content: flex-start; margin-top: .4rem; }
    .ev-orders-table .row-actions .actions:empty { display: none; }
}

/* ── Refunds ───────────────────────────────────────────────────────────────────────────── */
.refund-form { max-width: var(--w-read); }
/* one order's sums: plain figures on a hairline, like .ev-stats (no tiles, no capitals, no pink border) */
.refund-sums { gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0 0 1.6rem; max-width: var(--w-read); }
.refund-sums li, .refund-sums li.is-left { padding: .9rem 0; border: 0; border-top: 1px solid var(--lp-line); border-radius: 0; background: none; }
.refund-sums li > span:first-child { font-size: var(--fs-small); text-transform: none; letter-spacing: 0; }
.refund-sums strong { font-size: var(--fs-stat); font-weight: 600; letter-spacing: -.03em; }
.refund-choice .check > span .fine-print { display: block; margin: .1rem 0 0; }
@supports selector(:has(*)) {
    /* the amount box only for "An amount", the tickets only for "Some tickets" (all shown where :has isn't known) */
    .refund-choice .refund-tickets, .refund-choice .refund-amount { display: none; }
    .refund-choice:has(input[name="Form.What"][value="tickets"]:checked) .refund-tickets { display: grid; }
    .refund-choice:has(input[name="Form.What"][value="amount"]:checked) .refund-amount { display: grid; }
}
/* The fields under the table read at form width; only the table and the sticky bar run wide. */
.rf-form > label, .rf-form > .rf-fees { max-width: var(--w-read); }
.rf-fees { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.rf-fees legend { font-weight: 700; margin-bottom: .3rem; font-size: var(--fs-small); }
.rf-fees .fine-print { margin: 0; }
.rf-fees[hidden] { display: none; }
.rf-table td:first-child { width: 2rem; }
.rf-table input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--lp-brand); }
/* several orders: the count, amount and button stay in reach while ticking */
.rf-bar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
    margin: .4rem 0 0; padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom)); background: var(--lp-bg); border-top: 1px solid var(--lp-line); }
.rf-bar-summary { font-weight: 600; font-variant-numeric: tabular-nums; }
.rf-bar-summary:empty { display: none; }
html.app-mode .rf-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }
.rf-unit { display: none; }
@media (max-width: 639.98px) {
    /* a phone: each order is a card (tick, name and email, the refund; order and tickets in fine print), never clipped */
    .rf-table, .rf-table tbody, .rf-table tr, .rf-table td { display: block; }
    .rf-table thead { display: none; }
    .rf-table tr { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; grid-template-areas: "pick buyer amount" "pick ref tickets";
        gap: .2rem .6rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--lp-line); }
    .rf-table td { padding: 0; border: 0; text-align: left; }
    .rf-table td.rf-pick { grid-area: pick; width: auto; align-self: start; padding-top: .15rem; }
    .rf-table .rf-buyer { grid-area: buyer; min-width: 0; overflow-wrap: anywhere; }
    .rf-table .rf-amount { grid-area: amount; text-align: right; font-weight: 600; white-space: nowrap; }
    .rf-table .rf-ref { grid-area: ref; font-size: var(--fs-small); color: var(--lp-muted); }
    .rf-table .rf-tickets { grid-area: tickets; text-align: right; font-size: var(--fs-small); color: var(--lp-muted); white-space: nowrap; }
    .rf-unit { display: inline; }
}

/* ── Box office ─────────────────────────────────────────────────────────────────────────── */
.box-office .bo-event { margin: -.2rem 0 1rem; }
.bo-method { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.bo-method legend { font-size: var(--fs-small); font-weight: 600; margin-bottom: .3rem; }
.bo-method .segmented { flex-wrap: wrap; }
.bo-method .segmented span { padding: .55rem 1.1rem; }
.bo-method .fine-print { margin: 0; }
.bo-total { display: flex; justify-content: space-between; align-items: baseline; margin: .4rem 0 0; padding-top: .7rem; border-top: 1px solid var(--lp-line); }
.bo-total strong { font-size: var(--fs-heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.bo-total[hidden] { display: none; }

/* ── Door screen: find a guest ──────────────────────────────────────────────────────────── */
.door-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.door-find { margin: 1rem 0; }
.door-find-form { display: flex; gap: .5rem; }
.door-find-form input { flex: 1; min-width: 0; font: inherit; font-size: var(--fs-body); padding: .8rem .9rem; border: 1px solid var(--lp-line);
    border-radius: var(--radius-sm); background: var(--lp-bg); color: var(--lp-ink); }
.door-find-form input:focus-visible { outline: 2px solid var(--lp-brand); outline-offset: 1px; }
.door-find form { margin: 0; }
.door-find-results { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; border-bottom: 1px solid var(--lp-line); }
.door-find-results li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 0;
    border-top: 1px solid var(--lp-line); }
.door-find-who { display: grid; gap: .15rem; min-width: 0; }
.door-find-who strong { font-size: var(--fs-subhead); overflow-wrap: anywhere; }
.door-find-who .fine-print { margin: 0; }
.door-find-checkin { min-width: 9rem; }
.door-find-done { font-weight: 700; color: var(--success-text); }
@media (max-width: 560px) { .door-find-checkin { width: 100%; } }

/* ── Share ─────────────────────────────────────────────────────────────────────────────── */
.copy-row { display: flex; gap: .5rem; align-items: center; }
.copy-row .copy-field { flex: 1; min-width: 0; }
.ev-block > .copy-box + .btn, .share-embed .copy-field + .btn { margin-top: .5rem; }
.share-qr[hidden] { display: none; }
.share-qr-image { width: 180px; max-width: 60vw; margin: .3rem 0 .8rem; padding: 8px; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--lp-line); }
.share-qr-image svg { display: block; width: 100%; height: auto; }
.share-embed summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.share-embed[open] summary { margin-bottom: .6rem; }

/* ── Add-ons: each one a line; Edit opens its fields in place ─────────────────────────────── */
.addon-list { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--lp-line); max-width: var(--w-read); }
.addon-list > li { border-bottom: 1px solid var(--lp-line); }
.addon > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .85rem 0; }
.addon > summary::-webkit-details-marker { display: none; }
.addon-main { display: grid; gap: .1rem; flex: 1 1 14rem; min-width: 0; }
.addon-main .fine-print { margin: 0; }
.addon-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.addon-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.addon-edit { font-size: var(--fs-small); font-weight: 600; color: var(--lp-brand-text); }
.addon[open] .addon-edit { color: var(--lp-muted); }
.addon-fields { padding: 0 0 1rem; max-width: var(--w-read); }
.addon-new { margin-top: .4rem; }
.addon-new > summary { list-style: none; }
.addon-new > summary::-webkit-details-marker { display: none; }
.addon-new[open] > summary { margin-bottom: 1rem; }
.addon-new .add-extra { max-width: var(--w-read); }

@media print {
    .ev-head, .ev-tabs, .ev-back { display: none !important; }
}
