/* Houston Culture Calendar page styles. Everything custom is prefixed cc-.
   Loaded after user.css on pages/culture.html only. */

:root {
  --cc-fallback: #9aa0a6;   /* color for anything without a parent/type color */
  --cc-nav-h: 0px;   /* fixed site nav height, set by culture.js */
  --cc-stick: 0px;   /* nav + filter bar height, set by culture.js */
  --cc-ink: #212529;
}

/* Colors come from the Sheet: culture.js injects [data-parent="..."] and [data-type="..."]
   rules that set --cc (<style id="cc-taxonomy-colors">). Everything below reads
   var(--cc, var(--cc-fallback)). */

/* ---------- Hero ---------- */
.cc-hero { min-height: 18rem; overflow: hidden; }
.cc-hero .swiper { position: absolute; inset: 0; }
.cc-slide { position: relative; height: 100%; min-height: inherit; color: #fff; }
.cc-slide__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cc-slide--standin .cc-slide__bg { background: var(--cc, var(--cc-fallback)); }
.cc-slide__icon { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 7rem; color: rgba(255, 255, 255, .35); }
.cc-slide__icon svg { width: 1em; height: 1em; }
.cc-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0) 55%); }
.cc-slide__caption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 1.5rem 1.5rem 3rem; }
.cc-slide__caption strong { display: block; font-size: 1.35rem; line-height: 1.2; }
.cc-slide__caption span { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.cc-hero .swiper-pagination { z-index: 3; }
.cc-stats { margin-top: 1.5rem; }

/* ---------- Hero layouts: full-page by default, split with ?layout=split ---------- */
.cc-layout-split .cc-hero-full, html:not(.cc-layout-split) .cc-hero-split { display: none; }
.cc-hero-full .cc-stats { color: rgba(255, 255, 255, .8); }
.cc-hero-full__lede { max-width: 38rem; }
.cc-hero-full .indicator-arrow { border-color: #fff; }
.cc-hero-full .indicator { bottom: 1.5rem; }
.cc-hero-full h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
#cc-filterbar { scroll-margin-top: var(--cc-nav-h); }

/* ---------- Sticky filter bar ---------- */
.cc-filterbar {
  position: sticky; top: var(--cc-nav-h); z-index: 1020;
  background: #fff; border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  padding: .65rem 0;
}
/* Chips on top; below them the controls, with the count at the right (one column on phones). */
.cc-filterbar .container { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .cc-filterbar .container { grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; }
  .cc-filterbar__row { grid-column: 1 / -1; }
}
.cc-filterbar__row { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.cc-chips { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0; padding: 0; list-style: none; }
.cc-chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .cc-chips { flex-wrap: wrap; overflow: visible; } }
.cc-chips .nav-item { flex: 0 0 auto; }
.cc-chip {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  background: transparent; border: 1px solid #fff; cursor: pointer;
}
.cc-chip:hover { border-color: var(--bs-border-color, #dee2e6); }
.cc-chip.active { border-color: #000; }
.cc-chip__n { font-size: .7rem; font-weight: 400; color: #495057; }
/* Whole parent selected: tinted like a badge. Some of its types selected: outlined in its color, no fill. */
.cc-chip.active[data-parent] { background: color-mix(in srgb, var(--cc, var(--cc-fallback)) 15%, #fff); }
.cc-chip.is-partial { border-color: var(--cc, var(--cc-fallback)); background: transparent; }

/* Row 2: the types of the active parent(s) */
.cc-filterbar__row--sub { padding-left: .75rem; }
.cc-chips--sub { margin-top: .35rem; }
.cc-chip--sub { font-size: .85rem; padding-top: .25rem; padding-bottom: .25rem; }
.cc-sublabel { flex: 0 0 auto; display: inline-flex; align-items: center; margin: 0 .25rem 0 .9rem; color: #495057; font-weight: 700; white-space: nowrap; }
.cc-sublabel:first-child { margin-left: 0; }
.cc-chip:focus-visible, .cc-seg__btn:focus-visible, .cc-day:focus-visible, .cc-clear:focus-visible,
.cc-card__link:focus-visible, .cc-pill button:focus-visible, .cc-ics:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.cc-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--cc, var(--cc-fallback)); flex: 0 0 auto; display: inline-block; }

.cc-filters-toggle { flex: 0 0 auto; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.cc-filterbar__extra { display: none; gap: .75rem 1.25rem; align-items: flex-end; flex-wrap: wrap; padding-top: .75rem; }
.cc-filterbar__extra.is-open { display: flex; }
@media (min-width: 768px) { .cc-filterbar__extra { display: flex; } }
.cc-field { display: flex; flex-direction: column; gap: .2rem; }
.cc-field--grow { flex: 1 1 12rem; }
.cc-field__label { color: #495057; margin: 0; }
.cc-select { min-width: 9.5rem; }
.cc-select--presenter { width: 14rem; max-width: 100%; text-overflow: ellipsis; }
.cc-seg { display: inline-flex; border: 1px solid #adb5bd; border-radius: .375rem; overflow: hidden; }
.cc-seg__btn { background: #fff; border: 0; padding: .3rem .7rem; font-size: .8rem; font-weight: 700; color: #495057; cursor: pointer; white-space: nowrap; }
.cc-seg__btn + .cc-seg__btn { border-left: 1px solid #adb5bd; }
.cc-seg__btn[aria-pressed="true"] { background: #000; color: #fff; }
.cc-filterbar__meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-top: .5rem; }
@media (min-width: 768px) { .cc-filterbar__meta { align-self: end; justify-content: flex-end; padding-bottom: .15rem; } }
.cc-count { color: #495057; font-weight: 700; }
.cc-clear { color: #000; text-decoration: underline; }
.cc-pill-slot { display: inline-flex; }
.cc-pill { display: inline-flex; align-items: center; gap: .35rem; background: #000; color: #fff; border-radius: 999px; padding: .15rem .35rem .15rem .75rem; font-size: .8rem; font-weight: 700; }
.cc-pill button { background: transparent; border: 0; color: #fff; font-size: 1.05rem; line-height: 1; padding: 0 .35rem; cursor: pointer; border-radius: 50%; }
.cc-pill button:focus-visible { outline-color: #fff; }

/* ---------- Calendar ---------- */
@media (min-width: 992px) {
  .cc-cal-panel { position: sticky; top: calc(var(--cc-stick) + 1rem); }
}
/* below lg the calendar is a collapsible panel (not [hidden]: Bootstrap forces that to display:none !important) */
.cc-cal-panel.is-collapsed { display: none; }
@media (min-width: 992px) { .cc-cal-panel.is-collapsed { display: block; } }
.cc-cal__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.cc-cal__title { flex: 1 1 auto; margin: 0; font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cc-cal__nav { background: transparent; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .375rem; width: 2rem; height: 2rem; font-size: 1.1rem; line-height: 1; cursor: pointer; color: #000; }
.cc-cal__nav:disabled { opacity: .35; cursor: default; }
.cc-cal__nav:focus-visible, .cc-cal__today:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.cc-cal__today { background: none; border: 0; padding: 0 .25rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; color: #000; cursor: pointer; }
.cc-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cc-cal__dow { text-align: center; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: #495057; padding-bottom: .25rem; font-weight: 700; }
.cc-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  min-height: 3rem; padding: .3rem .1rem .2rem; background: #fff; border: 1px solid transparent; border-radius: .25rem;
  font: inherit; color: #6c757d; cursor: pointer;
}
.cc-day--blank { visibility: hidden; pointer-events: none; }
.cc-day:hover { background: #f4f5f6; }
.cc-day.has-events { color: var(--cc-ink); font-weight: 700; }
.cc-day__num { line-height: 1.1; font-size: .85rem; padding-bottom: 1px; border-bottom: 2px solid transparent; }
.cc-day.has-run .cc-day__num { border-bottom-color: rgba(0, 0, 0, .18); }
.cc-day.is-today { outline: 1.5px solid #000; outline-offset: -1px; }
.cc-day.is-selected { background: #000; color: #fff; }
.cc-day.is-selected .cc-day__num { border-bottom-color: rgba(255, 255, 255, .45); }
.cc-day.is-selected .cc-dot { box-shadow: 0 0 0 1px #fff; }
.cc-day__dots { display: flex; gap: 2px; align-items: center; justify-content: center; min-height: .5rem; margin-top: .2rem; font-size: .6rem; line-height: 1; }
.cc-day__dots .cc-dot { width: .42rem; height: .42rem; }
.cc-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: .7rem; color: #495057; }
.cc-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.cc-legend__note { margin-top: .5rem; font-size: .7rem; color: #495057; }

.cc-tooltip {
  position: fixed; z-index: 2000; max-width: 20rem; padding: .6rem .75rem; border-radius: .375rem;
  background: #111; color: #fff; font-size: .8rem; line-height: 1.3; box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  pointer-events: none; opacity: 0; transition: opacity .12s;
}
.cc-tooltip.is-on { opacity: 1; }
.cc-tooltip__day { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: .35rem; }
.cc-tooltip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.cc-tooltip li { display: flex; gap: .6rem; align-items: center; }
.cc-tooltip img, .cc-tooltip .cc-tooltip__ph { width: 64px; height: 64px; border-radius: .25rem; object-fit: cover; flex: 0 0 64px; background: var(--cc, var(--cc-fallback)); }
.cc-tooltip__tag { display: block; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }

/* ---------- Timeline ---------- */
.cc-group { margin-bottom: 2.5rem; }
.cc-group__head {
  position: sticky; top: var(--cc-stick); z-index: 5; background: #fff;
  display: flex; align-items: baseline; gap: .75rem; margin: 0 0 1rem; padding: .6rem 0;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  font-size: .9rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.cc-group__count { font-size: .7rem; font-weight: 400; color: #495057; }
.cc-events { position: relative; display: grid; gap: 1.25rem; padding-left: 1.5rem; }
.cc-events::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: .35rem; width: 1px; background: var(--bs-border-color, #dee2e6); }
.cc-event { position: relative; }
.cc-event.is-past { opacity: .5; }
.cc-node { position: absolute; left: -1.5rem; top: 1.1rem; width: .75rem; height: .75rem; margin-left: 0; border-radius: 50%; background: var(--cc, var(--cc-fallback)); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--bs-border-color, #dee2e6); }
.cc-date { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .35rem; line-height: 1; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; color: #495057; font-weight: 700; }
.cc-date__day { font-size: 1.5rem; letter-spacing: 0; color: #000; }
.cc-date__to { font-size: .65rem; font-weight: 400; letter-spacing: .06em; text-transform: none; }
.cc-date__run { font-size: .6rem; letter-spacing: .06em; font-weight: 400; white-space: nowrap; border: 1px solid #adb5bd; border-radius: 999px; padding: .05rem .4rem; }

@media (min-width: 768px) {
  .cc-events { padding-left: 6.25rem; }
  .cc-events::before { left: 5.25rem; }
  .cc-node { left: -1.35rem; top: 1.25rem; }
  .cc-date { position: absolute; left: -6.25rem; top: .55rem; width: 4.5rem; flex-direction: column; align-items: flex-end; gap: .15rem; text-align: right; margin: 0; }
  .cc-date__day { font-size: 1.9rem; }
  .cc-date__to, .cc-date__run { text-align: right; }
}

.cc-card {
  display: flex; flex-direction: column; overflow: hidden; background: #fff;
  border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .5rem;
  transition: transform .3s, box-shadow .3s;
}
.cc-card:hover, .cc-card:focus-within { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .1); }
@media (min-width: 768px) {
  .cc-card { flex-direction: row; }
  .cc-card .cc-tile { flex: 0 0 33.333%; aspect-ratio: auto; min-height: 9.5rem; }
  .cc-feature .cc-card { flex-direction: column; height: 100%; }
  .cc-feature .cc-card .cc-tile { flex: 0 0 auto; aspect-ratio: 16 / 9; min-height: 0; }
}
.cc-tile { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #e9ecef; }
.cc-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cc-card:hover .cc-tile img, .cc-card:focus-within .cc-tile img { transform: scale(1.05); }
.cc-tile--fallback::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .25); }
.cc-tile--standin { background: var(--cc, var(--cc-fallback)); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .85); font-size: 3.5rem; }
.cc-tile--standin svg { width: 1em; height: 1em; }
.cc-tile__strip { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cc, var(--cc-fallback)); }
.cc-fav { position: absolute; z-index: 3; top: .6rem; left: .6rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; }
.cc-tile__credit { position: absolute; z-index: 3; right: .5rem; bottom: .4rem; max-width: 90%; font-size: .6rem; line-height: 1.2; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 2px rgba(0, 0, 0, .8); text-align: right; }
.cc-tile__credit a { color: inherit; text-decoration: underline; }

.cc-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1rem; min-width: 0; }
.cc-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cc-badge {
  display: inline-block; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  padding: .2rem .55rem; border-radius: 999px; color: var(--cc-ink);
  background: color-mix(in srgb, var(--cc, var(--cc-fallback)) 15%, #fff);
}
.cc-goodfor { display: inline-block; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; padding: .15rem .5rem; border: 1px solid #adb5bd; border-radius: 999px; color: #495057; }
.cc-tagchip { font: inherit; font-size: .7rem; padding: .1rem .15rem; border: 0; background: none; color: #495057; cursor: pointer; text-decoration: underline; text-decoration-color: #ced4da; text-underline-offset: 2px; }
.cc-tagchip:hover, .cc-tagchip:focus-visible { color: #000; text-decoration-color: currentColor; }
.cc-title { margin: .1rem 0 0; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.cc-meta { margin: 0; font-size: .85rem; color: #495057; }
.cc-why { margin: 0; font-size: .9rem; }
.cc-through { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #495057; font-weight: 700; }
.cc-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .5rem; }
.cc-card__link { margin-left: auto; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #000; text-decoration: none; border-bottom: 1px solid #000; }
.cc-card__link:hover { color: #000; border-bottom-width: 2px; }
.cc-ics { background: none; border: 0; padding: 0; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #495057; text-decoration: underline; cursor: pointer; }

/* Now playing: feature strip */
.cc-feature-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .cc-feature-grid { grid-template-columns: 1fr 1fr; } }
.cc-feature { position: relative; }

.cc-empty { padding: 3rem 1rem; text-align: center; border: 1px dashed #adb5bd; border-radius: .5rem; }

/* Entrance: fade up (set up by JS only when IntersectionObserver is available) */
.cc-anim .cc-event, .cc-anim .cc-feature { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.cc-anim .cc-event.is-in, .cc-anim .cc-feature.is-in { opacity: 1; transform: none; }
.cc-anim .cc-event.is-past.is-in { opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  .cc-anim .cc-event, .cc-anim .cc-feature { opacity: 1; transform: none; transition: none; }
  .cc-anim .cc-event.is-past { opacity: .5; }
  .cc-card, .cc-tile img { transition: none; }
  .cc-card:hover, .cc-card:focus-within { transform: none; }
  .cc-card:hover .cc-tile img, .cc-card:focus-within .cc-tile img { transform: none; }
}
