/* ==========================================================================
   Events module - /events, /events/calendar, /events/{slug}
   Builds on site.css tokens + components (.card, .date-chip, .cal, .pill-list).
   ========================================================================== */

/* Hero */
.ev-hero .lead { max-width: 52ch; }
.ev-detail-hero h1 { max-width: 22ch; }
.ev-crumbs { font-size: .92rem; font-weight: 700; color: #EFE3D6; margin-bottom: 14px; }
.ev-crumbs a { color: #FFF8EE; }

/* Featured spotlight (large split card) */
.ev-spotlight { display: grid; grid-template-columns: 1fr; background: var(--cream); border-radius: calc(var(--radius) * 1.3); box-shadow: var(--shadow-lift); overflow: hidden; }
@media (min-width: 900px) { .ev-spotlight { grid-template-columns: 1.1fr 1fr; } }
.ev-spotlight-media { position: relative; display: block; min-height: 260px; background: var(--sand); }
.ev-spotlight-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-spotlight-media .date-chip { top: 18px; right: auto; left: 18px; padding: 8px 14px; }
.ev-spotlight-body { padding: clamp(26px, 4vw, 52px); display: flex; flex-direction: column; gap: 16px; }
.ev-spotlight-body h2 { margin: 0; }
.ev-spotlight-body h2 a { color: inherit; text-decoration: none; }
.ev-spotlight-body h2 a:hover { color: var(--terracotta); }
.ev-spotlight-body .eyebrow { margin-bottom: 0; }
.ev-spotlight-body .lead { margin: 0; font-size: 1.1rem; }
.ev-facts { gap: 10px; }

/* List header + filters */
.ev-list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.ev-list-head h2 { margin: 0; }
.ev-list-head .eyebrow { margin-bottom: .4rem; }
.ev-filters { margin-bottom: 28px; }
.ev-filters .pill-list a { font-size: .95rem; }

/* Month groups */
.ev-month + .ev-month { margin-top: clamp(36px, 5vw, 56px); }
.ev-month-title { display: flex; align-items: center; gap: 16px; font-size: 1.35rem; margin-bottom: 20px; color: var(--walnut); }
.ev-month-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Cards */
.ev-card .card-body h3 { font-size: 1.35rem; }
.ev-card-title { color: inherit; text-decoration: none; }
.ev-card-title:hover { color: var(--terracotta); }
.ev-card .date-chip small { display: block; }
.ev-repeat { display: inline-flex; align-items: center; gap: .35em; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }

/* Add-to-calendar disclosure */
.ev-addcal { position: relative; font-size: .92rem; }
.ev-addcal summary { list-style: none; cursor: pointer; font-weight: 700; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .4em; padding: 6px 0; }
.ev-addcal summary::-webkit-details-marker { display: none; }
.ev-addcal summary:hover { color: var(--terracotta); }
.ev-addcal-menu { position: absolute; z-index: 5; left: 0; top: 100%; min-width: 220px; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); padding: 6px; display: grid; }
.ev-addcal-menu a { padding: 10px 12px; border-radius: 8px; text-decoration: none; font-weight: 700; color: var(--walnut); }
.ev-addcal-menu a:hover { background: var(--sand); }

/* Subscribe panel */
.ev-subscribe { display: grid; gap: 22px; grid-template-columns: 1fr; background: var(--dusk); color: #E6EDF3; border-radius: calc(var(--radius) * 1.4); padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; }
@media (min-width: 760px) { .ev-subscribe { grid-template-columns: auto 1fr; align-items: start; } }
.ev-subscribe::after { content: ""; position: absolute; right: -90px; bottom: -90px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(227,163,59,.35), rgba(227,163,59,0) 70%); pointer-events: none; }
.ev-subscribe h2 { color: #fff; margin-bottom: .3em; }
.ev-subscribe .eyebrow { color: var(--honey); }
.ev-subscribe p { color: #D5DFE8; max-width: 60ch; }
.ev-subscribe-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: var(--honey); }
.ev-subscribe-icon .icon { width: 36px; height: 36px; }
.ev-subscribe-body { position: relative; z-index: 1; }
.ev-subscribe .btn-row { margin: 18px 0 8px; }
.ev-subscribe-note { font-size: .95rem; margin: 10px 0 0; }
.ev-copy { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--honey); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Empty state */
.ev-empty { text-align: center; background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(32px, 5vw, 56px) 24px; max-width: 680px; margin: 0 auto; }
.ev-empty h3 { margin-bottom: .4em; }
.ev-empty p { color: var(--ink-soft); }
.ev-empty .btn-row { justify-content: center; }
.ev-empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--honey-soft); color: var(--ember); }
.ev-empty-icon .icon { width: 30px; height: 30px; }

/* Calendar page */
.ev-cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.ev-cal-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-cal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.cal .cal-event.is-featured { background: var(--terracotta); color: #fff; }
.cal .cal-event:hover { background: var(--honey); }
.cal .cal-event.is-featured:hover { background: var(--ember); }
.cal .cal-time { font-weight: 600; opacity: .8; margin-right: 3px; }
.cal td { height: 120px; }
.ev-agenda { display: none; }
.ev-agenda.is-empty { display: block; }
@media (max-width: 760px) { .ev-agenda { display: block; } }
.ev-agenda-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ev-agenda-item { display: flex; gap: 16px; align-items: center; background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.ev-agenda-item:hover { color: var(--ink); box-shadow: var(--shadow-lift); }
.ev-agenda-item.is-today { box-shadow: inset 0 0 0 2px var(--terracotta), var(--shadow); }
.ev-agenda-date { flex: none; width: 58px; text-align: center; line-height: 1.1; border-right: 1px solid var(--line); padding-right: 14px; }
.ev-agenda-date b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--terracotta); }
.ev-agenda-date small { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.ev-agenda-text { display: flex; flex-direction: column; gap: 2px; font-size: .95rem; color: var(--ink-soft); min-width: 0; }
.ev-agenda-text strong { color: var(--walnut); font-size: 1.05rem; }

/* Detail page */
.ev-detail { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .ev-detail { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); } .ev-detail-side { position: sticky; top: 24px; } }
.ev-detail .h3 { font-size: 1.35rem; }
.ev-detail-main > .lead { margin-bottom: 1.4em; }
.ev-info-card { background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow-lift); padding: 26px; }
.ev-info-card .info-list { margin-bottom: 20px; }
.ev-side-actions { display: grid; gap: 10px; margin-bottom: 22px; }
.ev-share { border-top: 1px solid var(--line); padding-top: 18px; }
.ev-share-label { font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.ev-share .btn-row { gap: 8px; }
.ev-next-dates { margin-top: 2rem; background: var(--sand); border-radius: var(--radius); padding: 22px 24px; }
.ev-next-dates ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-weight: 600; }
.ev-next-dates .icon { color: var(--terracotta); }
.ev-register { margin-top: 2.5rem; scroll-margin-top: 24px; }
.ev-past-note a { font-weight: 800; }
/* Keep card width steady when a month has only one or two events. */
.ev-month .grid-3, .ev-related .grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* Add-to-calendar popover (JS) - fixed so card edges never clip it */
.ev-addcal-menu.is-floating { position: fixed; z-index: 120; left: 0; top: 0; }
.ev-addcal-menu { gap: 2px; }
.ev-addcal summary { min-height: 40px; }

/* Subscribe picker */
.ev-sub-step { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.ev-sub-step legend { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.ev-sub-num { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--honey); color: var(--walnut); font-size: .9rem; }
.ev-sub-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.ev-sub-choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.14); cursor: pointer; color: #E6EDF3; transition: background .15s, border-color .15s; }
.ev-sub-choice:hover { background: rgba(255,255,255,.13); }
.ev-sub-choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--honey); flex: none; }
.ev-sub-choice strong { display: block; color: #fff; }
.ev-sub-choice small { display: block; color: #C9D5E0; font-size: .88rem; line-height: 1.4; margin-top: 2px; }
.ev-sub-choice:has(input:checked) { border-color: var(--honey); background: rgba(227,163,59,.16); }
.ev-sub-choice:has(input:focus-visible) { outline: 3px solid var(--honey); outline-offset: 2px; }
.ev-sub-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: .92rem; color: #C9D5E0; }
.ev-sub-more .ev-sub-choice { padding: 6px 12px; border-radius: 999px; align-items: center; }
.ev-sub-more .ev-sub-choice input { margin-top: 0; width: 16px; height: 16px; }
.ev-subscribe .ev-sub-step .btn-row { margin: 0 0 6px; }
