/* ac-events: Events you sell - the public event page (event.aspx, .evp), the staff
   builder and sign-up list (event_edit.aspx, .evx), and the event type colors on
   both calendars (.evt-*). Every color comes from the school's theme variables
   (mt-ui.css), so light and dark themes both work. Cached 30 days (?v=). */

/* ---------- Event types on the calendars ---------- */
.evt-event { background: var(--mt-info-soft) !important; }
.evt-seminar { background: var(--mt-accent-soft) !important; box-shadow: inset 3px 0 0 var(--mt-accent); }
.evt-testing { background: var(--mt-warn-soft) !important; box-shadow: inset 3px 0 0 var(--mt-warn); }
.evt-family { background: var(--mt-good-soft) !important; }
.evt-tournament { background: color-mix(in srgb, #8E44AD 14%, var(--mt-card)) !important; box-shadow: inset 3px 0 0 #8E44AD; }
.evt-other { background: var(--mt-soft2) !important; }
.evt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: 0; }
.evt-dot.event { background: var(--mt-info); }
.evt-dot.seminar { background: var(--mt-accent); }
.evt-dot.testing { background: var(--mt-warn); }
.evt-dot.family { background: var(--mt-good); }
.evt-dot.tournament { background: #8E44AD; }
.evt-dot.closed { background: var(--mt-bad); }
.evt-dot.other { background: var(--mt-muted); }
.evt-sell { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--mt-accent); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.6; vertical-align: 1px; }
.evt-note { border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; font-size: 14px; line-height: 1.5; background: var(--mt-accent-soft); color: var(--mt-ink); }
.evt-note .mt-btn { margin-top: 8px; }
.evt-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }

/* Upcoming events (member portal home and calendar) */
.evu-list { display: flex; flex-direction: column; gap: 10px; }
.evu-item { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--mt-line); border-radius: 14px; background: var(--mt-card); color: var(--mt-ink) !important; text-decoration: none !important; min-width: 0; }
.evu-item:hover { background: var(--mt-soft); }
.evu-pic { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--mt-soft2); display: grid; place-items: center; color: var(--mt-accent); font-size: 24px; }
.evu-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.evu-txt b { font-size: 15.5px; overflow-wrap: anywhere; }
.evu-txt small { color: var(--mt-muted); font-size: 13px; overflow-wrap: anywhere; }
.evu-st { color: var(--mt-warn) !important; font-weight: 700; }
.evu-share { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--mt-muted); font-size: 13.5px; }

/* ---------- The public event page ---------- */
body.mt-pub .evp [hidden] { display: none !important; }
.evp-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--mt-muted); font-weight: 700; font-size: 15px; }
.evp-brand img { display: block; max-height: 44px; max-width: 160px; object-fit: contain; }
.evp-hero { padding: 0 !important; overflow: hidden; gap: 0 !important; }
.evp-hero > * { margin-left: 28px; margin-right: 28px; }
.evp-hero > .evp-flyer { margin: 0; display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; background: var(--mt-soft); }
.evp-head { display: flex; flex-direction: column; gap: 8px; padding-top: 24px; }
.evp-kind { align-self: flex-start; }
.evp-when { margin: 0; font-size: 17px; font-weight: 700; color: var(--mt-ink); }
.evp-sub { margin: 0; font-size: 15.5px; color: var(--mt-ink); overflow-wrap: anywhere; }
.evp-when .fa, .evp-sub .fa { width: 20px; text-align: center; color: var(--mt-muted); }
.evp-sub a { color: var(--mt-accent); font-weight: 700; }
.evp-price { margin: 6px 0 0; font-size: 19px; font-weight: 800; color: var(--mt-ink); }
.evp-early { margin: 0; color: var(--mt-good); font-weight: 700; font-size: 14.5px; }
.evp-spots { margin: 0; color: var(--mt-warn); font-weight: 700; font-size: 14.5px; }
.evp-desc { margin-top: 16px; font-size: 16px; line-height: 1.6; color: var(--mt-ink); overflow-wrap: anywhere; }
.evp-hero > p, .evp-hero > .evp-photos, .evp-hero > .evp-staff { margin-top: 14px; }
.evp-hero > :last-child { margin-bottom: 26px; }
.evp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.evp-photos img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: var(--mt-soft); }
.evp-staff { font-size: 13.5px; color: var(--mt-muted); padding: 10px 12px; border-radius: 12px; background: var(--mt-soft); }
.evp-staff a { color: var(--mt-accent); font-weight: 700; }
.evp-step { margin: 14px 0 8px; font-weight: 800; font-size: 16px; color: var(--mt-ink); }
.evp-step small { font-weight: 600; color: var(--mt-muted); font-size: 14px; }
.evp-hint { margin: 0 0 10px; color: var(--mt-muted); font-size: 14px; line-height: 1.45; }
.evp-member { margin: 0 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--mt-accent-soft); color: var(--mt-ink); font-size: 15px; }
.evp-member a { color: var(--mt-accent); font-weight: 800; }
.evp-people { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.evp-person { border: 1px solid var(--mt-line); border-radius: 14px; padding: 12px; background: var(--mt-card); min-width: 0; }
.evp-person.off { opacity: .6; }
label.evp-who { display: flex !important; align-items: center; gap: 12px; min-height: 40px; margin: 0 !important; cursor: pointer; font-weight: 500 !important; }
.evp-who input, .evp-opt input, .evp-how input { width: 22px; height: 22px; margin: 0 !important; flex: none; accent-color: var(--mt-accent); }
.evp-who small { display: block; color: var(--mt-muted); font-size: 13.5px; }
.evp-personopts { margin-top: 8px; }
.evp-guesthead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--mt-ink); }
.evp-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.evp-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
label.evp-opt { display: flex !important; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 1px dashed var(--mt-line); border-radius: 10px; margin: 0 !important; cursor: pointer; font-weight: 500 !important; color: var(--mt-ink); }
.evp-opt.off { opacity: .55; cursor: default; }
.evp-opt small { color: var(--mt-muted); }
.evp-hows { display: flex; flex-direction: column; gap: 8px; }
label.evp-how { display: flex !important; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--mt-line); border-radius: 12px; margin: 0 !important; cursor: pointer; color: var(--mt-ink); }
.evp-how:has(input:checked) { border-color: var(--mt-accent); background: var(--mt-accent-soft); }
.evp-how small { display: block; color: var(--mt-muted); font-size: 13px; }
.evp-card { margin-top: 10px; padding: 14px 12px; border: 1.5px solid var(--mt-line); border-radius: 12px; background: var(--mt-input); }
.evp-total { margin: 14px 0 6px; font-size: 17px; color: var(--mt-ink); }
.evp-total small { color: var(--mt-muted); font-size: 14px; }
.evp-full { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--mt-warn-soft); color: var(--mt-ink); font-size: 15px; }
.evp-closed { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--mt-soft); color: var(--mt-ink); font-size: 16px; }
.evp-hp { position: absolute !important; left: -5000px !important; width: 1px; height: 1px; overflow: hidden; }
.evp-sharerow { display: flex; flex-wrap: wrap; gap: 8px; }
.evp-info { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--mt-ink); margin: 0; }
.evp-info a { color: var(--mt-accent); font-weight: 700; }
.evp-info .fa { width: 20px; text-align: center; color: var(--mt-muted); }
.evp-del { width: 36px; padding: 0 !important; justify-content: center; }
@media (max-width: 600px) {
    .evp-hero > * { margin-left: 18px; margin-right: 18px; }
    .evp-3 { grid-template-columns: 1fr 1fr; }
    .evp-3 .mt-field:last-child { grid-column: 1 / -1; }
}

/* ---------- Staff: Events you sell ---------- */
.evx-empty { margin: 0; padding: 24px 16px; text-align: center; color: var(--mt-muted); font-size: 15px; }
.evx-bar, .evx-rbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.evx-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.evx-ev { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.evx-ev-main { min-width: 0; flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.evx-ev-t b { font-size: 16.5px; color: var(--mt-ink); overflow-wrap: anywhere; }
.evx-ev-sub { color: var(--mt-muted); font-size: 14px; overflow-wrap: anywhere; }
.evx-ev-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.evx-plain { display: flex; flex-direction: column; gap: 8px; }
.evx-plain-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--mt-line); border-radius: 12px; }
.evx-plain-row small { display: block; color: var(--mt-muted); }
.evx-edhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.evx-edtitle { margin: 0 !important; font: 800 22px/1.2 var(--mt-display) !important; color: var(--mt-ink) !important; overflow-wrap: anywhere; }
.evx-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.evx-f { margin-bottom: 12px; min-width: 0; }
.evx-f > label, .evx-label { display: block; margin: 0 0 4px !important; font-weight: 700; color: var(--mt-ink); }
.evx-f label small, .evx-hint { font-weight: 500; color: var(--mt-muted); }
.evx-hint { display: block; margin-top: 4px; font-size: 13px; }
.evx-f .form-control { width: 100%; }
.evx-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.evx-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.evx-money { position: relative; }
.evx-money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mt-muted); font-weight: 700; pointer-events: none; }
.evx-money input { padding-left: 26px !important; }
label.evx-check { display: flex !important; align-items: flex-start; gap: 10px; margin: 6px 0 12px !important; cursor: pointer; font-weight: 600 !important; color: var(--mt-ink); }
.evx-check input, .evx-radio input, .evx-classes input { width: 18px; height: 18px; margin: 2px 0 0 !important; flex: none; accent-color: var(--mt-accent); }
.evx-check small, .evx-radio small { display: block; font-weight: 500; color: var(--mt-muted); }
.evx-radios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
label.evx-radio { display: flex !important; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--mt-line); border-radius: 12px; margin: 0 !important; cursor: pointer; font-weight: 600 !important; color: var(--mt-ink); }
.evx-radio:has(input:checked) { border-color: var(--mt-accent); background: var(--mt-accent-soft); }
.evx-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 0 12px; max-height: 240px; overflow-y: auto; border: 1px solid var(--mt-line); border-radius: 12px; padding: 4px 12px; margin-bottom: 12px; }
.evx-classes label { display: flex !important; align-items: center; gap: 8px; min-height: 38px; margin: 0 !important; font-weight: 500 !important; cursor: pointer; }
.evx-more { margin: 4px 0 12px; }
.evx-more summary { cursor: pointer; font-weight: 700; color: var(--mt-ink); margin-bottom: 10px; }
.evx-opt { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--mt-line); }
.evx-opt .evx-f-wide { grid-column: 1 / -2; }
.evx-opt-x { margin-bottom: 12px; width: 38px; padding: 0 !important; justify-content: center; }
.evx-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.evx-file { border: 1px solid var(--mt-line); border-radius: 12px; overflow: hidden; background: var(--mt-soft); display: flex; flex-direction: column; }
.evx-file img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.evx-file .evx-pdf { display: flex; align-items: center; gap: 8px; padding: 18px 12px; color: var(--mt-ink); font-weight: 600; overflow-wrap: anywhere; }
.evx-file-acts { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 6px; background: var(--mt-card); }
.evx-uploading { padding: 18px 12px; color: var(--mt-muted); font-size: 13px; }
label.evx-upbtn { cursor: pointer; margin: 0 !important; }
.evx-err { color: var(--mt-bad); font-weight: 600; margin: 8px 0; }
.evx-err:empty { display: none; }
.evx-note { border-radius: 12px; padding: 12px 14px; margin: 10px 0 0; font-size: 14px; line-height: 1.5; background: var(--mt-soft); color: var(--mt-ink); }
.evx-note.warn { background: var(--mt-warn-soft); }
.evx-note.bad { background: var(--mt-bad-soft); }
.evx-sharelink { display: flex; gap: 8px; margin-bottom: 10px; }
.evx-sharelink input { flex: 1 1 auto; min-width: 0; }
.evx-sharebtns { display: flex; flex-wrap: wrap; gap: 8px; }
.evx-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 0; background: var(--mt-bg); }
.evx-savebar .evx-err { margin-right: auto; }
.evx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.evx-stats div { padding: 10px 12px; border-radius: 12px; background: var(--mt-soft); }
.evx-stats b { display: block; font-size: 22px; color: var(--mt-ink); }
.evx-stats small { color: var(--mt-muted); }
.evx-search { width: auto !important; flex: 1 1 180px; max-width: 280px; }
.evx-rtools { display: flex; gap: 6px; flex-wrap: wrap; }
.evx-reg-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.evx-reg-head b { font-size: 16px; color: var(--mt-ink); }
.evx-reg-head small { display: block; margin-top: 4px; color: var(--mt-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.evx-reg-total { font-weight: 800; font-size: 16px; color: var(--mt-ink); text-align: right; white-space: nowrap; }
.evx-reg-total small { display: block; font-weight: 600; font-size: 12.5px; color: var(--mt-bad); }
.evx-people { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.evx-person { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--mt-line); border-radius: 12px; }
.evx-person.off { opacity: .55; }
.evx-person small { display: block; color: var(--mt-muted); }
.evx-reg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
body.evx-lock { overflow: hidden; }
/* Popups: a full-screen dim backdrop over everything (ac-nav's shared .mt-ovl styles take over after the merge). */
.evx-ovl { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
@supports (backdrop-filter: blur(2px)) { .evx-ovl { backdrop-filter: blur(2px); } }
.evx-box { width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--mt-card); color: var(--mt-ink); border-radius: calc(var(--mt-r) + 4px); box-shadow: var(--mt-shadow-lg); font-family: var(--mt-font); }
.evx-box-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; border-bottom: 1px solid var(--mt-line); }
.evx-box-t { margin: 0 !important; font: 800 20px/1.25 var(--mt-display) !important; color: var(--mt-ink) !important; }
.evx-x { flex: none; width: 40px; height: 40px; border-radius: 20px; border: 0; background: var(--mt-soft); color: var(--mt-ink); cursor: pointer; font-size: 17px; }
.evx-box-body { padding: 14px 20px; overflow-y: auto; }
.evx-box-body p { margin: 0 0 12px; }
.evx-box-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 20px 18px; border-top: 1px solid var(--mt-line); }
@media (max-width: 760px) {
    .evx-2, .evx-3 { grid-template-columns: 1fr; }
    .evx-opt { grid-template-columns: 1fr 1fr; }
    .evx-opt .evx-f:first-child, .evx-opt .evx-f-wide { grid-column: 1 / -1; }
    .evx-opt-x { grid-column: 1 / -1; width: auto; }
    .evx-ovl { align-items: flex-end; padding: 0; }
    .evx-box { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
    .evx-box-foot .mt-btn { flex: 1 1 auto; }
    .evx-reg-head { flex-direction: column; }
    .evx-reg-total { text-align: left; }
}

/* al-eventwaiver: the waiver on the sign-up page and in "Who signed up" */
.evp-waiver { margin: 6px 0 4px; }
.evp-wtext { white-space: pre-wrap; max-height: 260px; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--mt-line); border-radius: 12px; background: var(--mt-input, var(--mt-card)); color: var(--mt-ink); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
label.evp-wagree { display: flex !important; align-items: flex-start; gap: 10px; margin: 12px 0 !important; cursor: pointer; font-weight: 600 !important; color: var(--mt-ink); }
.evp-wagree input { width: 22px; height: 22px; margin: 0 !important; flex: none; accent-color: var(--mt-accent); }
.evp-sigwrap { margin: 8px 0 6px; }
.evp-siglbl { margin: 0 0 6px; font-weight: 700; color: var(--mt-ink); font-size: 14.5px; }
canvas.evp-sig { display: block; width: 100%; max-width: 560px; height: 160px; border: 1.5px dashed var(--mt-line); border-radius: 12px; background: #ffffff; touch-action: none; cursor: crosshair; margin-bottom: 8px; }
.evx-wtext { white-space: pre-wrap; max-height: 45vh; overflow-y: auto; padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--mt-line); border-radius: 12px; background: var(--mt-soft); color: var(--mt-ink); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
img.evx-wsig { display: block; max-width: 100%; border: 1px solid var(--mt-line); border-radius: 12px; background: #ffffff; margin: 0 0 10px; }
.evx-wwho b { color: var(--mt-ink); }
textarea.evx-wedit { font-size: 14px; line-height: 1.5; }
