/* Events on the community portal (Phase 7 · Stage 3).
 * Surface styles only — builds on portal.css (cards, page heads, forms).
 */

/* --- Event list / cards ------------------------------------------------ */
.evp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.evp-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.evp-card:hover { border-color: var(--portal-accent, var(--color-primary)); box-shadow: var(--shadow-md); }
.evp-date {
  flex: 0 0 auto;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2) 0;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--portal-accent, var(--color-primary-active));
}
.evp-date-month { font-size: var(--text-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.evp-date-day { font-size: 22px; font-weight: 700; line-height: 1.1; }
.evp-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}
.evp-card-body { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.evp-card-title { font-weight: 600; font-size: var(--text-h3); color: var(--color-text-primary); }
.evp-card-meta { font-size: var(--text-small); color: var(--color-text-secondary); }
.evp-card-tag {
  flex: 0 0 auto;
  font-size: var(--text-tiny);
  font-weight: 600;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
}
.evp-card-tag-booked { background: var(--color-success-soft); color: var(--color-success-text); }

/* --- Event page ---------------------------------------------------------
 * Desktop: cover, title + facts and the write-up on the left; the booking
 * card on the right from the very top, so booking is always in view.
 * Below 960px it all stacks with the booking card straight after the key
 * facts, and a bar at the bottom of the screen jumps back to it.
 * The last row is 1fr so a tall booking card never opens gaps on the left.
 */
.evp-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "hero book"
    "head book"
    "body book";
  column-gap: 48px;
  row-gap: 32px;
  align-items: start;
}
.evp-page-no-cover {
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "head book"
    "body book";
}
.evp-hero { grid-area: hero; }
.evp-head { grid-area: head; }
.evp-body { grid-area: body; }
.evp-book { grid-area: book; align-self: stretch; }

.evp-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: var(--color-surface-muted);
  box-shadow: var(--portal-shadow);
}

/* Title with a calendar leaf */
.evp-head-row { display: flex; align-items: flex-start; gap: 20px; }
.evp-head-text { min-width: 0; }
.evp-head .portal-eyebrow { margin-bottom: 6px; }
.evp-leaf {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 64px;
  overflow: hidden;
  border: 1px solid var(--portal-hairline);
  border-radius: 12px;
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow);
  text-align: center;
}
.evp-leaf-month {
  padding: 5px 0 4px;
  background: var(--portal-accent);
  color: var(--portal-on-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.evp-leaf-day {
  padding: 8px 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--portal-ink);
}
.evp-title {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--portal-ink);
  overflow-wrap: anywhere;
}

.evp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.evp-tag {
  padding: 4px 11px;
  border: 1px solid var(--portal-hairline);
  border-radius: var(--radius-pill);
  background: var(--portal-surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--portal-muted);
}
.evp-tag-warn {
  border-color: color-mix(in srgb, var(--color-warning) 40%, transparent);
  background: var(--color-warning-soft);
  color: var(--color-warning-text);
}
.evp-tag-danger {
  border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
  background: var(--color-danger-soft);
  color: var(--color-danger);
}
/* The event type, e.g. "Conference". */
.evp-tag-type {
  border-color: transparent;
  background: var(--portal-accent-soft);
  color: var(--portal-accent-text);
}

/* Key facts */
.evp-facts { margin: 28px 0 0; border-top: 1px solid var(--portal-hairline); }
.evp-fact { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--portal-hairline); }
.evp-fact dt {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--portal-accent-soft);
  color: var(--portal-accent-text);
}
.evp-fact-icon { width: 20px; height: 20px; }
.evp-fact dd {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--portal-muted);
}
.evp-fact dd strong { font-size: 15px; font-weight: 600; color: var(--portal-ink); }
.evp-fact-link {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-accent-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.evp-fact-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.evp-fact-link svg { flex: none; width: 14px; height: 14px; }

/* About + host */
.evp-section + .evp-section { margin-top: 40px; }
.evp-section-title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--portal-ink);
}
.evp-prose {
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--portal-ink);
  overflow-wrap: anywhere;
}
.evp-prose p { margin: 0 0 1em; }
.evp-prose p:last-child { margin-bottom: 0; }
.evp-host {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--portal-hairline);
  border-radius: var(--portal-radius);
  background: var(--portal-surface);
}
.evp-host .org-avatar { flex: none; width: 48px; height: 48px; border-radius: 12px; font-size: 18px; font-weight: 600; }
.evp-host .org-avatar:not(.has-logo) { background-color: var(--portal-accent); color: var(--portal-on-accent); }
.evp-host .org-avatar.has-logo { padding: 3px; border: 1px solid var(--portal-hairline); box-sizing: border-box; background: #fff; }
.evp-host-name { margin: 0 0 2px; font-weight: 600; color: var(--portal-ink); }

/* --- Booking card --------------------------------------------------------- */
.evp-book-card {
  overflow: hidden;
  scroll-margin-top: 16px;
  background: var(--portal-surface);
  border: 1px solid var(--portal-hairline);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 24px 48px -28px rgba(28, 25, 23, 0.35);
}
.evp-book-card.is-sticky { position: sticky; top: 24px; }
.evp-book-head {
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--portal-hairline);
  background: linear-gradient(180deg, var(--portal-accent-soft), var(--portal-surface));
}
.evp-price {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--portal-ink);
}
.evp-price-prefix { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--portal-muted); }
.evp-price-note { margin: 4px 0 0; font-size: 13px; color: var(--portal-muted); }

.evp-book-state { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 26px; }
.evp-book-state strong { font-size: 15px; color: var(--portal-ink); }
.evp-book-state p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--portal-muted); }
.evp-book-state-danger strong { color: var(--color-danger); }
.evp-book-state-done { align-items: flex-start; }
.evp-book-check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--color-success-soft);
  color: var(--color-success-text);
}
.evp-book-check svg { width: 22px; height: 22px; }
.evp-book-state-done strong { font-size: 17px; }
.evp-book-state-done .portal-btn { margin-top: 14px; }
.evp-book-state-done .portal-btn + .portal-btn { margin-top: 4px; }
.evp-book-more { align-self: center; margin-top: 6px; }
/* An event people register for on the organiser's own website. */
.evp-book-elsewhere .portal-btn { margin-top: 14px; }
.evp-book-elsewhere .portal-btn svg { width: 16px; height: 16px; margin-left: 4px; }
.evp-book-elsewhere .evp-total-note { margin: 2px 0 0; text-align: center; }

.evp-form { display: flex; flex-direction: column; gap: 24px; padding: 22px 24px 24px; }
.evp-form .portal-alert { margin: 0; }
.evp-step { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.evp-step + .evp-step { padding-top: 22px; border-top: 1px solid var(--portal-hairline); }

/* Booking form fields: two to a row, or the full width (set per field by the admin). */
.evp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.evp-field { min-width: 0; }
.evp-field-full { grid-column: 1 / -1; }
.evp-field .field { margin: 0; }
@media (max-width: 420px) {
  .evp-fields { grid-template-columns: minmax(0, 1fr); }
}
.evp-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--portal-ink);
}
.evp-step-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--portal-ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}

/* Ticket options */
.evp-tiers { display: flex; flex-direction: column; gap: 10px; }
.evp-tier {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--portal-hairline-strong);
  border-radius: 12px;
  background: var(--portal-surface);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}
.evp-tier:hover { border-color: var(--portal-accent); }
.evp-tier:has(input:checked) {
  border-color: var(--portal-accent);
  background: var(--portal-accent-soft);
  box-shadow: inset 0 0 0 1px var(--portal-accent);
}
.evp-tier:has(input:focus-visible) { box-shadow: var(--focus-ring), inset 0 0 0 1px var(--portal-accent); }
.evp-tier input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--portal-accent); }
.evp-tier-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.evp-tier-name { font-size: 14.5px; font-weight: 600; color: var(--portal-ink); }
.evp-tier-desc { font-size: 12.5px; line-height: 1.45; color: var(--portal-muted); }
.evp-tier-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
  color: var(--portal-muted);
}
.evp-tier-price {
  flex: none;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--portal-ink);
}
/* The ticket picked for a signed-in member (events that pick the ticket) — shown, not chosen. */
.evp-tier-picked,
.evp-tier-picked:hover {
  border-color: var(--portal-accent);
  background: var(--portal-accent-soft);
  box-shadow: inset 0 0 0 1px var(--portal-accent);
  cursor: default;
}

/* "Your ticket" popup: the ticket found for a visitor's email, to pay or confirm. */
.evp-dialog {
  width: min(420px, calc(100vw - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--portal-hairline);
  border-radius: 16px;
  background: var(--portal-surface);
  color: var(--portal-ink);
  box-shadow: 0 24px 48px -16px rgb(15 23 42 / 0.35);
}
.evp-dialog:not([open]) { display: none; }
.evp-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.evp-dialog::backdrop { background: rgb(15 23 42 / 0.45); }
/* Without JavaScript it stays open in the card, under the Join button. */
.evp-dialog[open]:not(:modal) { position: static; width: auto; margin: 0; box-shadow: none; }
.evp-dialog-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--portal-muted);
}
.evp-dialog-title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--portal-ink); }
.evp-dialog-desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--portal-muted); }
.evp-dialog-price {
  margin: 4px 0 6px;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--portal-ink);
}
.evp-dialog .evp-secure { margin: 0; }

/* Quantity stepper — a plain number input until events-portal.js adds − / + */
.evp-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evp-qty-label { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: var(--portal-ink); }
.evp-qty-hint { font-size: 12px; font-weight: 400; color: var(--portal-muted); }
.evp-stepper {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--portal-hairline-strong);
  border-radius: 10px;
  background: var(--portal-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.evp-stepper:focus-within { border-color: var(--portal-accent); box-shadow: var(--focus-ring); }
.evp-stepper-btn {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--portal-ink);
  cursor: pointer;
  transition: background-color var(--transition);
}
.evp-stepper-btn[hidden] { display: none; }
.evp-stepper-btn svg { width: 16px; height: 16px; }
.evp-stepper-btn:hover:not(:disabled) { background: var(--portal-canvas); }
.evp-stepper-btn:disabled { color: var(--portal-hairline-strong); cursor: default; }
.evp-stepper-input {
  width: 56px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--portal-ink);
}
.evp-stepper-input:focus { outline: none; }
.evp-stepper.is-enhanced .evp-stepper-input {
  width: 48px;
  border-inline: 1px solid var(--portal-hairline);
  -moz-appearance: textfield;
  appearance: textfield;
}
.evp-stepper.is-enhanced .evp-stepper-input::-webkit-outer-spin-button,
.evp-stepper.is-enhanced .evp-stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.evp-coupon summary {
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-accent-text);
  cursor: pointer;
  list-style: none;
}
.evp-coupon summary::-webkit-details-marker { display: none; }
.evp-coupon summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.evp-coupon[open] summary { margin-bottom: 8px; }

.evp-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--portal-hairline-strong);
}
.evp-total[hidden] { display: none; }
.evp-total-label { font-size: 14px; font-weight: 600; color: var(--portal-ink); }
.evp-total-label span { margin-left: 4px; font-size: 12.5px; font-weight: 400; color: var(--portal-muted); }
.evp-total strong { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--portal-ink); }
.evp-total-note { margin: -6px 0 0; font-size: 12px; color: var(--portal-muted); }

.evp-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--portal-canvas);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--portal-muted);
}
.evp-actions { display: flex; flex-direction: column; gap: 10px; }
.evp-cta {
  min-height: 52px;
  border-radius: 12px;
  font-size: 15.5px;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--portal-accent) 80%, transparent);
}
.evp-cta[aria-busy="true"] { opacity: 0.8; cursor: progress; }
.evp-secure {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin: -10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--portal-muted);
}
.evp-secure[hidden] { display: none; }
/* A Pay button's form takes no box: the button sits in the actions row / stack. */
.evp-pay-form { display: contents; }
.evp-secure svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* Mobile "Get tickets" bar */
.evp-mobilebar { display: none; }
.evp-mobilebar-text { display: flex; flex-direction: column; min-width: 0; }
.evp-mobilebar-price {
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--portal-ink);
}
.evp-mobilebar-date { font-size: 12px; color: var(--portal-muted); }
.evp-mobilebar-btn { flex: none; min-height: 44px; padding-inline: 22px; font-weight: 600; }

@media (max-width: 960px) {
  .evp-page,
  .evp-page-no-cover {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "hero" "head" "book" "body";
    row-gap: 28px;
  }
  .evp-page-no-cover { grid-template-areas: "head" "book" "body"; }
  .evp-mobilebar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px var(--portal-gutter) calc(12px + env(safe-area-inset-bottom));
    background: var(--portal-surface);
    border-top: 1px solid var(--portal-hairline);
    box-shadow: 0 -12px 32px -20px rgba(28, 25, 23, 0.35);
    transition: transform 0.25s ease;
  }
  .evp-mobilebar.is-hidden { transform: translateY(110%); }
  .portal-body:has(.evp-mobilebar) .portal-footer { padding-bottom: 76px; }
}

@media (max-width: 600px) {
  .evp-cover { border-radius: 14px; }
  .evp-head-row { gap: 14px; }
  .evp-leaf { width: 56px; }
  .evp-leaf-day { font-size: 22px; }
  .evp-book-head,
  .evp-form,
  .evp-book-state { padding-right: 18px; padding-left: 18px; }
}

/* --- My events: bookings as e-tickets ------------------------------------
 * A date stub, a perforated edge (a dashed line with two notches cut out
 * of the card), then the booking details and actions. Past and cancelled
 * bookings use a compact, muted version with no actions.
 */
.evp-mine-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.evp-bookings { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }

.evp-pass {
  --pass-stub: 116px;
  position: relative;
  display: grid;
  grid-template-columns: var(--pass-stub) minmax(0, 1fr);
  background: var(--portal-surface);
  border: 1px solid var(--portal-hairline);
  border-radius: 16px;
  box-shadow: var(--portal-shadow);
}
/* The two notches where the ticket would tear. */
.evp-pass::before,
.evp-pass::after {
  content: "";
  position: absolute;
  left: calc(var(--pass-stub) - 12px);
  width: 20px;
  height: 20px;
  border: 1px solid var(--portal-hairline);
  border-radius: 50%;
  background: var(--portal-canvas);
}
.evp-pass::before { top: -11px; clip-path: inset(50% 0 0 0); }
.evp-pass::after { bottom: -11px; clip-path: inset(0 0 50% 0); }

.evp-pass-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 8px;
  border-right: 2px dashed var(--portal-hairline-strong);
  border-radius: 15px 0 0 15px;
  background: var(--portal-accent-soft);
  color: var(--portal-accent-text);
  text-align: center;
}
.evp-pass-dow,
.evp-pass-month { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.evp-pass-day {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--portal-ink);
}

.evp-pass-main { min-width: 0; padding: 20px 24px 20px 28px; }
.evp-pass-head { display: flex; align-items: flex-start; gap: 14px; }
.evp-pass-thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-surface-muted);
}
.evp-pass-heading { flex: 1 1 auto; min-width: 0; }
.evp-pass-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--portal-muted);
}
.evp-pass-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.evp-pass-title a { color: var(--portal-ink); text-decoration: none; }
.evp-pass-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.evp-pass-head .portal-status { margin-top: 2px; }

.evp-pass-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 24px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--portal-hairline);
}
.evp-pass-facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--portal-muted);
}
.evp-pass-facts dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--portal-ink);
  overflow-wrap: anywhere;
}
.evp-pass-tz { font-size: 12px; font-weight: 400; color: var(--portal-muted); }

.evp-pass-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-hairline);
}
.evp-pass-actions .btn { font-weight: 600; }
.evp-pass-actions .btn svg { width: 16px; height: 16px; }
.evp-pass-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-accent-text);
  text-decoration: none;
}
.evp-pass-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.evp-pass-more svg { width: 14px; height: 14px; }

.evp-pass-line { margin: 6px 0 0; font-size: 13px; color: var(--portal-muted); }

/* Past / cancelled */
.evp-pass.is-muted { --pass-stub: 88px; box-shadow: none; }
.evp-pass.is-muted .evp-pass-stub { padding: 14px 6px; background: var(--color-surface-muted); color: var(--portal-muted); }
.evp-pass.is-muted .evp-pass-day { font-size: 28px; color: var(--portal-muted); }
.evp-pass.is-muted .evp-pass-main { padding: 16px 20px 16px 24px; }
.evp-pass.is-muted .evp-pass-title { font-size: 16px; }
.evp-pass.is-muted .evp-pass-title a { color: var(--portal-muted); }

.evp-status-danger {
  border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
  background-color: var(--color-danger-soft);
  color: var(--color-danger);
}

/* Google Wallet: full size on the ticket, compact in My events rows. */
.gwallet-btn.gwallet-btn-sm { min-height: 36px; gap: 8px; padding: 0 16px 0 12px; font-size: 13.5px; }
.gwallet-btn-sm .gwallet-icon { width: 18px; height: 18px; }

/* Calendar button on single-booking screens (ticket, "You're booked", done) */
.evp-gcal { gap: 8px; }
.evp-gcal svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  .evp-pass { --pass-stub: 84px; }
  .evp-pass.is-muted { --pass-stub: 72px; }
  .evp-pass-day { font-size: 30px; }
  .evp-pass-main { padding: 16px 16px 16px 20px; }
  .evp-pass-head { flex-direction: column; gap: 8px; }
  .evp-pass-thumb { display: none; }
  .evp-pass-facts { grid-template-columns: 1fr 1fr; }
  .evp-pass-actions .btn { flex: 1 1 100%; justify-content: center; min-height: 42px; }
  .evp-pass-more { margin-left: 0; }
}

/* --- Ticket ------------------------------------------------------------
 * The same pass language as My events, turned upright: header and details
 * on top, a perforated tear line with a notch on each side, and the QR on
 * the stub below. Wallet and calendar actions sit outside the ticket.
 */
.evp-ticket { width: 100%; max-width: 440px; margin-inline: auto; gap: 20px; }

.evp-tkt {
  --tkt-pad: 28px;
  background: var(--portal-surface);
  border: 1px solid var(--portal-hairline);
  border-radius: 18px;
  box-shadow: var(--portal-shadow);
}

.evp-tkt-head { padding: var(--tkt-pad) var(--tkt-pad) 0; }
.evp-tkt-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.evp-tkt-brand .portal-eyebrow { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.evp-tkt-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--portal-ink);
  overflow-wrap: anywhere;
}

.evp-tkt-facts {
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  margin: 22px var(--tkt-pad) 0;
  padding: 20px 0 var(--tkt-pad);
}
.evp-tkt-facts dd { font-size: 15px; }
.evp-tkt-wide { grid-column: 1 / -1; }
.evp-nowrap { white-space: nowrap; }
.evp-tkt-sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--portal-muted); }
.evp-tkt-alert { margin: 0 var(--tkt-pad) var(--tkt-pad); }

.evp-tkt-stub {
  position: relative;
  padding: 28px var(--tkt-pad) 26px;
  border-top: 2px dashed var(--portal-hairline-strong);
  text-align: center;
}
/* The two notches where the ticket would tear. */
.evp-tkt-stub::before,
.evp-tkt-stub::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--portal-hairline);
  border-radius: 50%;
  background: var(--portal-canvas);
}
.evp-tkt-stub::before { left: -11px; clip-path: inset(0 0 0 50%); }
.evp-tkt-stub::after { right: -11px; clip-path: inset(0 50% 0 0); }

.evp-qr { width: 196px; max-width: 100%; margin: 0 auto; }
.evp-qr svg { display: block; width: 100%; height: auto; }
.evp-code { margin: 12px 0 4px; font-size: 16px; letter-spacing: 0.18em; color: var(--portal-ink); }
.evp-tkt-note { max-width: 32ch; margin: 0 auto; font-size: 14px; line-height: 1.6; color: var(--portal-muted); }

.evp-tkt-actions .gwallet-btn { width: 100%; }

@media (max-width: 600px) {
  .evp-tkt { --tkt-pad: 22px; }
  .evp-tkt-title { font-size: 22px; }
}

/* --- Portal home block -------------------------------------------------- */
.evp-home-block { margin-top: var(--space-8); }
