/* Oak-Ed Events house style: warm cards (spec §2, mockup C). Per-event colours
   arrive as --ev-* custom properties from shows/theme.py; these are the
   defaults for staff pages and the list. */
@font-face {
  font-family: 'EB Garamond';
  src: url("../fonts/EBGaramond-Variable.f12bc30ca94a.woff2") format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url("../fonts/EBGaramond-Italic-Variable.985f75b87984.woff2") format('woff2');
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ev-bg: #f4f1ec;
  --ev-card: #ffffff;
  --ev-ink: #1f2937;
  --ev-muted: #4b5563;
  --ev-accent: #1f7a5c;
  --ev-on-accent: #ffffff;
  --ev-tint: #e3efe9;
  --ev-radius: 18px;
  --ev-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ev-serif: 'EB Garamond', Georgia, serif;
  --wa-color-brand-fill-loud: var(--ev-accent);
  --wa-color-brand-on-loud: var(--ev-on-accent);
}

* { box-sizing: border-box; }

/* Site bar on every page: sign-in stays quiet for buyers (they never need an
   account); signed-in staff get My events and Sign out. */
.ev-site-bar { max-width: 1080px; margin: 0 auto; padding: 10px 16px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font: 0.9rem var(--ev-sans); }
.ev-site-bar__brand { font: 700 1.05rem var(--ev-serif); color: var(--ev-ink); text-decoration: none; }
.ev-site-bar__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ev-site-bar__nav form { margin: 0; }
.ev-site-bar__who { color: var(--ev-muted); overflow-wrap: anywhere; }
.ev-site-bar__quiet { color: var(--ev-muted); }
body { margin: 0; background: var(--ev-bg); color: var(--ev-ink); font: 16px/1.5 var(--ev-sans); }
a { color: var(--ev-accent); }
h1 { font: 700 clamp(1.6rem, 4vw, 2.3rem)/1.15 var(--ev-serif); margin: 0.3rem 0; }
h2 { font: 700 1.3rem/1.2 var(--ev-serif); }

.ev-page { max-width: 1080px; margin: 0 auto; padding: 16px; }
.ev-card { background: var(--ev-card); border-radius: var(--ev-radius); padding: 18px; margin-bottom: 12px; }
.ev-narrow { max-width: 560px; margin-inline: auto; }
.ev-prose { font: 1.1rem/1.65 var(--ev-serif); }
.ev-credits { color: var(--ev-muted); font-size: 0.95rem; }
.ev-muted { color: var(--ev-muted); }
.ev-small { font-size: 0.85rem; }
.ev-when { font-weight: 700; margin: 0; }
.ev-price { font-weight: 700; font-size: 1.2rem; margin: 0 0 4px; }
.ev-category { border: 1px solid var(--ev-tint); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.ev-category--out { opacity: .55; }
.ev-category p { margin: 4px 0; }
.ev-category__head { display: flex; justify-content: space-between; gap: 8px; }
.ev-category__price { font-weight: 700; }
.ev-banner { background: #fde8e8; color: #7f1d1d; border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.ev-total { font-weight: 700; }
.ev-terms { margin: 12px 0; }
.ev-terms__title { font-size: 1rem; margin: 0 0 4px; }
.ev-terms__list { margin: 0 0 6px; padding-left: 1.2em; }
.ev-state { font-weight: 600; }

.ev-grid { display: grid; gap: 12px; }
@media (min-width: 860px) {
  .ev-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .ev-grid__side { position: sticky; top: 16px; }
}

/* Front page: one card per event, poster beside the words. */
.ev-event-list { display: grid; gap: 12px; }
.ev-event-card { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--ev-tint); color: var(--ev-ink); text-decoration: none; }
.ev-event-card:hover { outline: 2px solid var(--ev-accent); }
.ev-event-card__poster { flex: none; width: 96px; height: 128px; object-fit: cover; border-radius: 10px; background: #ddd; }
.ev-event-card__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-event-card__title { font: 700 1.2rem/1.2 var(--ev-serif); }
.ev-event-list--past .ev-event-card { background: transparent; border: 1px solid #ece8e1; }
.ev-event-list--past .ev-event-card__poster { width: 64px; height: 86px; }
@media (min-width: 860px) { .ev-event-list:not(.ev-event-list--past) .ev-event-card__poster { width: 150px; height: 200px; } }

.ev-lang { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-pill { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--ev-tint); color: var(--ev-ink); font: 600 0.8rem var(--ev-sans); text-decoration: none; }
.ev-pill--on { background: var(--ev-accent); color: var(--ev-on-accent); }

.ev-button, .ev-big-button {
  display: block; width: 100%; text-align: center; margin-top: 12px; padding: 12px 18px;
  border: 0; border-radius: 999px; background: var(--ev-accent); color: var(--ev-on-accent);
  font: 700 1rem var(--ev-sans); text-decoration: none; cursor: pointer;
}
.ev-big-button { padding: 18px; font-size: 1.2rem; }
.ev-button--quiet { background: var(--ev-tint); color: var(--ev-ink); }
.ev-link-button { background: none; border: 0; padding: 0; color: var(--ev-accent); font: inherit; cursor: pointer; text-decoration: underline; }
.ev-inline-form { display: inline; }
.ev-media-thumb { max-height: 140px; }
.ev-card--outlined { border: 1px solid #ece8e1; }

/* --slides-per-page: wa-carousel sets it with a style attribute, which the
   CSP refuses (a console line on each event page); inherited from here. */
.ev-carousel { --aspect-ratio: 4 / 3; --slides-per-page: 1; border-radius: var(--ev-radius); overflow: hidden; margin-bottom: 12px; background: #222; }
.ev-slide { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; overflow: hidden; }
.ev-slide__blur { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); max-width: none; object-fit: cover; object-position: center; filter: blur(18px) brightness(0.7); }
.ev-slide__image { position: relative; height: 100%; width: auto; max-width: 100%; object-fit: contain; }

form p { margin: 0 0 12px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url],
input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d6d3cd; border-radius: 10px; font: inherit; background: #fff;
}
.errorlist { color: #b42318; margin: 4px 0; padding: 0; list-style: none; font-size: 0.9rem; }

/* Staff pages: phone in one hand at a door. */
.ev-staff-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.ev-staff-bar__event { font-weight: 800; text-decoration: none; }
.ev-staff-bar__view { font-size: 0.9em; }
.ev-staff-bar__nav { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.ev-staff-links { padding-left: 1.2rem; }
.ev-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ev-table th, .ev-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #ece8e1; vertical-align: top; }
.ev-door-search { position: sticky; top: 0; z-index: 2; background: var(--ev-bg); padding: 8px 0; }
.ev-door-search input { font-size: 1.2rem; padding: 14px; }
.ev-door-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.ev-door-row__name { font-size: 1.15rem; font-weight: 700; }
.ev-door-row--done { opacity: 0.6; }
.ev-attention { color: #b42318; font-weight: 600; }

@media print {
  body { background: #fff; }
  .ev-site-bar, .ev-staff-bar, .ev-noprint { display: none; }
  .ev-card { padding: 0; border-radius: 0; }
  .ev-print td.ev-boxes { letter-spacing: 6px; font-size: 1.2rem; }
}
