/* What's On. MOBILE-FIRST. Builds on crime.css, businesses.css and app.css. */

.date-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }

/* range + radius controls */
.ev-controls { display: grid; gap: .6rem; margin-bottom: .85rem; }
.ev-controls label { font-weight: 700; font-size: .85rem; display: block; margin-bottom: .2rem; }
.ev-controls select {
    width: 100%; min-height: 2.75rem; padding: .4rem .6rem; font-size: 1rem; border: 2px solid #b8c9d2; border-radius: .45rem; background: #fff; color: #17324d;
}
.ev-controls select:focus-visible { outline: 3px solid var(--lookout-teal); outline-offset: 2px; }
.range-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .85rem; }

/* event cards: the date leads */
.ev-card { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .7rem; background: #f8fbfc; border: 1px solid #dbe6ea; border-radius: .5rem; padding: .7rem; }
.ev-card.is-featured { background: #f3faf8; border-color: #8fd9cd; }
.ev-date { display: grid; align-content: center; justify-items: center; border-radius: .45rem; color: #fff; padding: .3rem .2rem; line-height: 1.1; min-height: 3.4rem; }
.ev-date .d { font-size: 1.35rem; font-weight: 800; }
.ev-date .m { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ev-body { display: grid; gap: .25rem; min-width: 0; }
.ev-body h3 { font-size: 1rem; font-weight: 750; margin: 0; overflow-wrap: anywhere; }
.ev-body h3 a { color: var(--lookout-navy); text-decoration: none; }
.ev-body h3 a:hover { text-decoration: underline; }
.ev-when { margin: 0; font-weight: 700; font-size: .88rem; color: #0b5a3a; }
.ev-meta { margin: 0; font-size: .85rem; color: #4a6272; overflow-wrap: anywhere; }

.ev-pin { width: 24px; height: 24px; border-radius: 6px; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.5); transform: rotate(45deg); }
.ev-pin.is-featured { box-shadow: 0 0 0 3px #0B2D5B, 0 1px 6px rgba(0,0,0,.5); }

@media (min-width: 576px) {
    .date-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ev-controls { grid-template-columns: 1fr 1fr; }
}

/* ================= picture tiles (list cards) =================
   With a picture: the photo with a white day/month chip. Without one: a coloured tile with a big date,
   so every card looks finished and the list stays easy to scan. */
.ev-card { grid-template-columns: 5rem minmax(0, 1fr); gap: .8rem; align-items: start; }
.ev-thumb {
    position: relative; width: 5rem; height: 5rem; border-radius: .6rem; overflow: hidden; flex: 0 0 auto;
    background: var(--c, #7b8794) linear-gradient(145deg, rgba(255,255,255,.2), rgba(0,0,0,.2));
    color: #fff; display: grid; place-items: center; align-content: center; line-height: 1.05;
}
.ev-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-thumb .d { font-size: 1.75rem; font-weight: 800; }
.ev-thumb .m { font-size: .75rem; font-weight: 800; letter-spacing: .06em; }
.ev-thumb.has-img { background: #dfe9ee; }
.ev-chip {
    position: absolute; left: .3rem; top: .3rem; display: grid; justify-items: center; min-width: 2.1rem; padding: .15rem .3rem;
    border-radius: .4rem; background: rgba(255,255,255,.95); color: var(--lookout-navy); line-height: 1.05; box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.ev-chip .d { font-size: .95rem; font-weight: 800; }
.ev-chip .m { font-size: .6rem; font-weight: 800; letter-spacing: .05em; }
.badge-free { background: #d7f2e5; color: #0b5a3a; }

/* search + free filter */
.ev-find { display: grid; gap: .6rem; margin-bottom: .85rem; }
.ev-find input[type="search"] {
    width: 100%; min-height: 2.9rem; padding: .6rem .8rem; font-size: 1rem; color: #17324d; background: #fff;
    border: 2px solid #b8c9d2; border-radius: .45rem;
}
.ev-find input[type="search"]:focus-visible { outline: 3px solid var(--lookout-teal); outline-offset: 2px; }
.chip-toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; font-size: .95rem; font-weight: 600; cursor: pointer; }
.chip-toggle input { width: 1.3rem; height: 1.3rem; }
.biz-popup-img { width: 100%; max-width: 14rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .4rem; display: block; }

/* ================= event page hero ================= */
.ev-hero { position: relative; border-radius: .8rem; overflow: hidden; margin: 0 0 1rem; aspect-ratio: 16 / 9; max-height: 26rem; background: #dfe9ee; }
.ev-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-hero-fallback {
    display: grid; place-content: center; justify-items: center; gap: .15rem; text-align: center; color: #fff; aspect-ratio: auto; min-height: 9rem;
    background: var(--c, #0B2D5B) linear-gradient(135deg, rgba(255,255,255,.22), rgba(0,0,0,.28));
}
.ev-hero-fallback .ev-hero-day { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.ev-hero-fallback .ev-hero-mon { font-size: 1rem; font-weight: 800; letter-spacing: .14em; }
.ev-hero-fallback .ev-hero-cat { margin-top: .35rem; font-size: .85rem; font-weight: 700; opacity: .95; background: rgba(255,255,255,.2); padding: .15rem .75rem; border-radius: 2rem; }

/* admin / account thumbnails */
.ev-mini { width: 6.5rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .45rem; display: block; background: #dfe9ee; }

@media (min-width: 768px) {
    .ev-thumb { width: 5.5rem; height: 5.5rem; }
    .ev-card { grid-template-columns: 5.5rem minmax(0, 1fr); }
    .ev-find { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

/* ---- tighter control area so the events appear sooner ---- */
.ev-find { display: block; margin-bottom: .6rem; }
.ev-controls { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; margin-bottom: .6rem; }
.ev-controls > div { flex: 1 1 9rem; }
.ev-controls select { min-height: 2.75rem; }
/* date and category chips: one swipeable line instead of wrapping onto several rows */
.ev-page .range-tabs, .ev-page .chips {
    flex-wrap: nowrap; overflow-x: auto; margin-bottom: .6rem; padding-bottom: .3rem;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.ev-page .range-tabs .chip, .ev-page .chips .chip { flex: 0 0 auto; }
