/* Content calendar: archive-aismm_event.php (month view) and single-aismm_event.php. Tokens from site.css. */

.cal { padding-top: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); }
.cal [hidden] { display: none !important; }
.cal time, .cal-dates time, .cal-near time { font-variant-numeric: tabular-nums; }

/* type chips */
.cal-type { display: inline-flex; align-items: center; padding: .2em .65em; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: 12.5px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.cal-type--holiday { background: var(--tint-rose); }
.cal-type--awareness { background: var(--tint-mint); }
.cal-type--professional { background: var(--tint-blue); }
.cal-type--fun { background: var(--tint-sand); }
.cal-type--shopping { background: var(--tint-lilac); }
.cal-type--season { background: var(--tint-sky); }

/* filters */
.cal-filters { position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border-radius: var(--r-tile); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.cal-filter { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; color: var(--muted); }
.cal-filter:last-of-type { grid-column: 1 / -1; }
.cal-filter select { width: 100%; min-height: 44px; padding: 0 36px 0 12px; border-radius: var(--r-input); border: 1px solid var(--line); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8c92' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); font: inherit; font-size: 15px; appearance: none; }
.cal-filter select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-reset { grid-column: 1 / -1; min-height: 40px; }
@media (min-width: 760px) {
  .cal-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
  .cal-filter:last-of-type, .cal-reset { grid-column: auto; }
}

/* next 14 days */
.cal-upcoming h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 14px; }
.cal-up { display: flex; gap: 10px; margin: 0; padding: 2px 0 10px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.cal-up__item { flex: 0 0 min(240px, 78vw); scroll-snap-align: start; }
.cal-up__item a { height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; }
.cal-up__item a:hover { border-color: var(--accent); }
.cal-up__item time { font-size: 13px; color: var(--muted); }
.cal-up__item em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); }
.cal-up__item b { font-size: 16px; line-height: 1.3; margin-bottom: auto; }

.cal-empty { margin: 0; padding: 18px 20px; border-radius: var(--r-tile); border: 1px dashed var(--line); color: var(--muted); font-size: 15px; }

/* month tabs */
.cal-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: -12px; scrollbar-width: thin; }
.cal-tab { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 88px; padding: 8px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14.5px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.cal-tab small { font-size: 11.5px; font-weight: 500; color: var(--faint); }
.cal-tab:hover { border-color: var(--accent); }
.cal-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cal-tab.is-active small { color: inherit; opacity: .7; }

/* month */
.cal-month { scroll-margin-top: calc(var(--header-h) + 90px); }
.cal-month__title { font-size: clamp(24px, 3vw, 34px); margin: 12px 0 8px; }
.cal-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.cal-day.is-today .cal-day__date b { background: var(--accent); color: var(--accent-ink); }
.cal-day__date { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-day__date b { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sunken); font-size: 20px; }
.cal-day__date span { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.cal-day__events { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cal-ev { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cal-ev > a { font-size: 16.5px; text-decoration: none; }
.cal-ev > a:hover b { color: var(--accent); text-decoration: underline; }
.cal-ev abbr { text-decoration: none; color: var(--muted); cursor: help; }
.cal-ev__short { flex-basis: 100%; color: var(--muted); font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 760px) {
  .cal-day { grid-template-columns: 110px minmax(0, 1fr); gap: 24px; }
  .cal-day__date { flex-direction: row; align-items: center; gap: 10px; align-self: start; }
  .cal-day__date span { text-align: left; }
}

.cal-cta { margin-top: 12px; }
.cal-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* single event */
.cal-dates { display: flex; flex-wrap: wrap; gap: 10px; }
.cal-date { display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 12px 16px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); }
.cal-date.is-next { border-color: var(--accent-line); background: var(--accent-soft); }
.cal-date small { font-size: 12.5px; color: var(--muted); }
.cal-date time { font-size: 19px; font-weight: 650; }
.cal-date em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); }
.cal-note { margin: 0; color: var(--muted); font-size: 15px; }
.cal-facts p { margin: 0 0 12px; padding: 0 10px; font-size: 14.5px; color: var(--ink-2); }
.cal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-chips .chip { font-size: 12.5px; padding: .3em .7em; }
.cal-single .a-body ul:not(.cal-near) li { margin-bottom: .5em; }
.cal-near { display: flex; flex-direction: column; gap: 8px; padding: 0; list-style: none; }
.cal-near a { display: flex; align-items: baseline; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.cal-near a:hover { border-color: var(--accent); }
.cal-near time { flex: none; min-width: 92px; color: var(--muted); font-size: 14.5px; }
.cal-near b { font-weight: 600; font-size: 16px; line-height: 1.35; }
