/* lc-events.css — time-first events directory. Neutral white foundation, sharp corners,
   one restrained accent (green) for active filters/buttons. Featured markers = neutral dark. */
:root{
  --lc-ink:#1a1a1a; --lc-muted:#6b6b6b; --lc-line:#e5e5e5;
  --lc-bg:#fff; --lc-bg-soft:#fafafa; --lc-accent:#303033; --lc-gold:#1a1a1a;
  --lc-shadow:0 6px 24px rgba(0,0,0,.10);
  --lc-chrome:"Montserrat",-apple-system,sans-serif; --lc-serif:"PT Serif",Georgia,serif;
}
#lc-events-app{background:var(--lc-bg);color:var(--lc-ink);font-family:var(--lc-serif)}
#lc-events-app *{box-sizing:border-box}
.lc-time-btn,.lc-cat,.lc-sidebar h3,.lc-btn,.lc-count,.lc-meta,.lc-date-badge,.lc-ribbon,.lc-chip{
  font-family:var(--lc-chrome);text-transform:uppercase;letter-spacing:2px;font-weight:600}

/* Time bar */
.lc-timebar{display:flex;border-bottom:1px solid var(--lc-line);background:var(--lc-bg);
  position:sticky;top:0;z-index:20;overflow-x:auto}
.lc-time-btn{flex:1;min-width:120px;padding:18px 10px;background:none;border:0;color:var(--lc-muted);
  cursor:pointer;border-bottom:3px solid transparent;font-size:11px}
.lc-time-btn[aria-pressed="true"]{color:var(--lc-accent);border-bottom-color:var(--lc-accent)}

/* Category chips */
.lc-catbar{display:flex;gap:8px;padding:12px 20px;flex-wrap:wrap;border-bottom:1px solid var(--lc-line)}
.lc-cat{padding:7px 14px;border:1px solid var(--lc-line);border-radius:0;background:none;
  color:var(--lc-muted);cursor:pointer;font-size:10px}
.lc-cat[aria-pressed="true"]{background:var(--lc-accent);color:#fff;border-color:var(--lc-accent)}

/* Body: sidebar | results | map */
.lc-body{display:flex;min-height:calc(100vh - 150px)}
.lc-sidebar{width:260px;flex:0 0 260px;padding:20px;border-right:1px solid var(--lc-line);
  position:sticky;top:130px;align-self:flex-start;max-height:calc(100vh - 130px);overflow:auto}
.lc-sidebar h3{margin:18px 0 8px;padding-bottom:6px;border-bottom:1px solid var(--lc-line);
  color:var(--lc-ink);font-size:11px}
.lc-sidebar h3:first-child{margin-top:0}
.lc-sidebar label{display:flex;align-items:center;gap:8px;padding:5px 0;font-family:var(--lc-serif);
  font-size:14px;text-transform:none;letter-spacing:0;cursor:pointer;color:var(--lc-ink)}
.lc-sidebar input[type=search]{width:100%;padding:9px;border:1px solid var(--lc-line);border-radius:0;
  font-family:var(--lc-serif)}
/* Area filter list */
.lc-hide{display:none}
.lc-areas{max-height:240px;overflow:auto}
.lc-areas label span:first-of-type{flex:1}
.lc-area-n{color:var(--lc-muted);font-family:var(--lc-chrome);font-size:10px;letter-spacing:1px;font-weight:600}
/* Date range inputs */
.lc-daterange{display:flex;flex-direction:column;gap:8px}
.lc-daterange input[type=date]{width:100%;padding:8px 9px;border:1px solid var(--lc-line);border-radius:0;
  font-family:var(--lc-serif);color:var(--lc-ink);background:#fff}
.lc-results{flex:1;min-width:0;padding:16px 20px}
.lc-map{flex:0 0 38%;min-width:360px;position:sticky;top:130px;height:calc(100vh - 130px)}
.lc-results-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.lc-count{font-size:11px;color:var(--lc-muted);margin-bottom:14px}
.lc-results-head .lc-count{margin-bottom:0}
.lc-sort{display:flex;align-items:center;gap:8px;font-family:var(--lc-chrome);text-transform:uppercase;
  letter-spacing:1px;font-size:10px;font-weight:600;color:var(--lc-muted)}
.lc-sort select{font-family:var(--lc-chrome);font-size:11px;padding:6px 8px;border:1px solid var(--lc-line);
  border-radius:0;background:#fff;color:var(--lc-ink);text-transform:none;letter-spacing:0;cursor:pointer}

/* View switch (List / Calendar) */
.lc-viewbar{display:flex;justify-content:flex-end;padding:8px 20px;border-bottom:1px solid var(--lc-line);background:var(--lc-bg)}
.lc-viewswitch{display:inline-flex;border:1px solid var(--lc-line)}
.lc-view-btn{font-family:var(--lc-chrome);text-transform:uppercase;letter-spacing:1px;font-size:10px;font-weight:600;
  padding:7px 16px;background:#fff;border:0;color:var(--lc-muted);cursor:pointer}
.lc-view-btn + .lc-view-btn{border-left:1px solid var(--lc-line)}
.lc-view-btn[aria-pressed="true"]{background:var(--lc-accent);color:#fff}

/* Calendar (month grid) */
.lc-cal{display:none;flex:1;min-width:0;padding:16px 20px}
#lc-events-app.lc-calmode .lc-timebar,#lc-events-app.lc-calmode .lc-results,#lc-events-app.lc-calmode .lc-map{display:none}
#lc-events-app.lc-calmode .lc-cal{display:block}
.lc-cal-nav{display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:16px}
.lc-cal-title{font-family:var(--lc-serif);font-size:20px;color:var(--lc-ink);min-width:190px;text-align:center}
.lc-cal-arrow{font-family:var(--lc-serif);font-size:22px;line-height:1;width:38px;height:38px;border:1px solid var(--lc-line);
  background:#fff;color:var(--lc-ink);cursor:pointer;border-radius:0}
.lc-cal-arrow:hover{background:var(--lc-bg-soft)}
.lc-cal-dow{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));font-family:var(--lc-chrome);text-transform:uppercase;
  letter-spacing:1px;font-size:10px;font-weight:600;color:var(--lc-muted)}
.lc-cal-dow span{padding:6px 8px}
/* minmax(0,1fr), not 1fr, on BOTH grids. A 1fr track carries an implicit min-width:auto, so a
   nowrap event title wider than its column blows the track out — the cells grid was measured at
   1848px inside a 1125px container with seven unequal columns (282/176/251/251/290/281/306).
   The weekday header is a separate grid with no such content, so it stayed at seven equal
   columns and the two disagreed: every day number sat under the wrong weekday name, and a
   Tuesday game read as Wednesday. The ellipsis on .lc-cal-ev can only do its job once the
   track refuses to grow. */
.lc-cal-cells{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--lc-line);border:1px solid var(--lc-line)}
.lc-cal-cell{background:#fff;min-height:118px;padding:5px 5px 6px;display:flex;flex-direction:column;gap:3px}
.lc-cal-empty{background:var(--lc-bg-soft)}
.lc-cal-daynum{font-family:var(--lc-chrome);font-size:11px;font-weight:600;color:var(--lc-muted)}
.lc-cal-has .lc-cal-daynum{color:var(--lc-ink)}
.lc-cal-ev{display:block;font-family:var(--lc-serif);font-size:11px;line-height:1.25;color:var(--lc-ink);text-decoration:none;
  padding:2px 5px;border-left:2px solid var(--lc-accent);background:var(--lc-bg-soft);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lc-cal-ev:hover{background:#eef3f0}
.lc-cal-ev b{font-family:var(--lc-chrome);font-weight:700;font-size:9px}
.lc-cal-feat{border-left-color:var(--lc-gold)}
.lc-cal-more{font-family:var(--lc-chrome);text-transform:uppercase;letter-spacing:.5px;font-size:9px;font-weight:600;
  color:var(--lc-accent);background:none;border:0;padding:2px 5px;text-align:left;cursor:pointer}
@media(max-width:720px){
  .lc-cal-scroll{overflow-x:auto}
  .lc-cal-dow,.lc-cal-cells{min-width:640px}
}

/* Card */
.lc-card{display:grid;grid-template-columns:208px 1fr auto;gap:16px;padding:14px;margin-bottom:14px;
  border:1px solid var(--lc-line);border-radius:0;background:var(--lc-bg);cursor:pointer;transition:box-shadow .15s}
.lc-card:hover{box-shadow:var(--lc-shadow)}
.lc-card.lc-featured{border-left:3px solid var(--lc-gold)}
.lc-photo{position:relative;width:208px;height:150px;border-radius:0;overflow:hidden;background:var(--lc-bg-soft)}
.lc-photo img{width:100%;height:100%;object-fit:cover}
.lc-date-badge{position:absolute;top:8px;left:8px;background:var(--lc-bg);border-radius:0;padding:5px 9px;
  text-align:center;box-shadow:var(--lc-shadow);line-height:1.15}
.lc-date-badge .d-dow{font-size:9px;letter-spacing:1px;color:var(--lc-muted)}
.lc-date-badge .d-day{font-size:19px;font-weight:700;color:var(--lc-ink)}
.lc-date-badge .d-mon{font-size:9px;letter-spacing:1px;color:var(--lc-accent)}
/* A run of consecutive dates fills the same badge: month, "18–23", then the count.
   The figure drops a few points and loses its tracking because five characters at
   the single-day size push the badge across a third of a 208px photograph. */
.lc-date-run .d-day{font-size:16px;letter-spacing:0}
.lc-ribbon{position:absolute;bottom:0;left:0;right:0;background:var(--lc-gold);color:#fff;
  font-size:9px;text-align:center;padding:3px;letter-spacing:2px}
.lc-info{min-width:0}
.lc-name{font-family:var(--lc-serif);font-size:19px;margin:2px 0 4px;color:var(--lc-ink);line-height:1.2}
.lc-meta{font-size:10px;color:var(--lc-muted)}
.lc-time{font-family:var(--lc-serif);font-size:14px;color:var(--lc-muted);margin-top:6px;text-transform:none}
.lc-chip{display:inline-block;font-size:9px;letter-spacing:1px;padding:4px 9px;border:1px solid var(--lc-line);
  border-radius:0;margin-top:8px;color:var(--lc-muted);text-transform:none;font-weight:500}
.lc-rail{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;text-align:right;gap:10px}
.lc-price{font-family:var(--lc-serif);font-size:17px;color:var(--lc-ink)}
.lc-price.lc-free{color:var(--lc-accent)}
.lc-btn{display:inline-block;padding:9px 16px;background:var(--lc-accent);color:#fff;border:0;border-radius:0;
  cursor:pointer;text-decoration:none;font-size:10px;white-space:nowrap}
.lc-empty{font-family:var(--lc-serif);color:var(--lc-muted);padding:50px 0;font-size:16px}

/* Leaflet marker price/label bubbles */
.lc-pin{background:var(--lc-accent);color:#fff;font-family:var(--lc-chrome);font-size:10px;font-weight:700;
  padding:3px 7px;border-radius:0;white-space:nowrap;box-shadow:var(--lc-shadow);border:2px solid #fff}
.lc-pin.lc-pin-feat{background:var(--lc-gold)}

/* Card title link: reads as text, not a blue hyperlink */
.lc-name a{color:inherit;text-decoration:none}
.lc-name a:hover{color:var(--lc-accent)}

/* ---- Map popup: compact vertical card, sharp corners --------------------
   The wide 3-column list card collapses to unreadable one-word-per-line
   ribbons in a ~260px popup, so the popup uses its own vertical layout
   (photo on top, body below) and we strip Leaflet's rounded chrome. */
.lc-pop-wrap .leaflet-popup-content-wrapper{
  border-radius:0;padding:0;box-shadow:var(--lc-shadow);border:1px solid var(--lc-line);overflow:hidden}
.lc-pop-wrap .leaflet-popup-content{margin:0;width:260px!important}
.lc-pop-wrap .leaflet-popup-tip{border-radius:0}
.lc-pop-wrap a.leaflet-popup-close-button{
  width:26px;height:26px;top:6px;right:6px;padding:0;line-height:26px;text-align:center;
  font-size:18px;color:#fff;background:rgba(0,0,0,.45)}
.lc-pop-wrap a.leaflet-popup-close-button:hover{color:#fff;background:rgba(0,0,0,.72)}
.lc-pop{width:260px;font-family:var(--lc-serif);color:var(--lc-ink);cursor:default}
.lc-pop-media{display:block;position:relative;height:150px;overflow:hidden;background:var(--lc-bg-soft)}
.lc-pop-media img{width:100%;height:100%;object-fit:cover;display:block}
/* A club badge stands in where the event has no photograph: shown whole, on a plain ground. */
.lc-photo--logo img{object-fit:contain;padding:14px;box-sizing:border-box;background:#fff}
.lc-pop-body{padding:12px 14px}
.lc-pop-name{font-family:var(--lc-serif);font-size:17px;line-height:1.2;margin:4px 0 0}
.lc-pop-name a{color:var(--lc-ink);text-decoration:none}
.lc-pop-name a:hover{color:var(--lc-accent)}
.lc-pop .lc-time{margin-top:4px}
.lc-pop-rail{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}
.lc-pop-rail .lc-price{font-size:15px}

/* Mobile controls */
.lc-toggle,.lc-filters-toggle{display:none}
@media(max-width:1199px){
  .lc-map{display:none}
  .lc-map.lc-map-open{display:block;position:fixed;inset:130px 0 0;z-index:40;min-width:0}
}
@media(max-width:959px){
  .lc-body{display:block}
  .lc-sidebar{position:fixed;inset:auto 0 0 0;top:auto;width:100%;max-height:78vh;transform:translateY(100%);
    transition:transform .25s;z-index:50;box-shadow:var(--lc-shadow);border-right:0;border-top:1px solid var(--lc-line)}
  .lc-sidebar.lc-open{transform:translateY(0)}
  .lc-card{grid-template-columns:1fr}
  .lc-photo{width:100%;height:190px}
  .lc-rail{flex-direction:row;align-items:center}
  .lc-toggle,.lc-filters-toggle{display:inline-block;position:fixed;bottom:16px;z-index:60}
  .lc-filters-toggle{left:16px} .lc-toggle{right:16px}

  /* ---- site bottom bar adopted (lc-mobile-nav funnel reveal) ---------------
     When the shared bar takes over Filters + Map, the page's own floating
     buttons are redundant — hide them so mobile shows ONE bar. The class is
     added by adoptBottomBar() ONLY after the handover succeeds, so if the bar is
     absent the floating buttons stay as the fallback. */
  #lc-events-app.lc-has-bottombar #lc-ft,
  #lc-events-app.lc-has-bottombar #lc-mt{display:none}

  /* The Map action button's pressed accent (aria-pressed toggles inside the
     bar). --lc-accent resolves from #lc-bottombar's own tokens. */
  #lc-bottombar .lc-ev-mapbtn[aria-pressed="true"]{color:var(--lc-accent)}

  /* ---- filter surfaces INSIDE the reveal panel -----------------------------
     addReveal moves .lc-sidebar (and we shuttle .lc-catbar) into
     .lc-bottombar__panel, which lives at <body> level OUTSIDE #lc-events-app.
     The panel supplies the scroll + skin (#lc-bottombar rules give box-sizing
     and the :root tokens are global), so we only need to neutralise the mobile
     bottom-SHEET positioning the sidebar carries and give the moved surfaces
     sane full-width padding. */
  .lc-bottombar__panel .lc-sidebar{
    position:static;transform:none;inset:auto;z-index:auto;
    width:auto;max-width:none;max-height:none;overflow:visible;
    border-top:0;border-right:0;box-shadow:none;background:transparent;
    padding:14px 16px}
  .lc-bottombar__panel .lc-catbar{padding:14px 16px;margin:0}

  /* The mobile map overlay is position:fixed inset:130px 0 0 — its bottom:0
     would slide under the fixed bar. Reserve the bar's height (only when the bar
     is actually on, and only at this width where the bar is shown). */
  html.lc-bottombar-on .lc-map.lc-map-open{
    bottom:calc(var(--lc-bottombar-h, 56px) + env(safe-area-inset-bottom, 0px))}
}

/* ======================================================================
   THE LANDING — the masthead (markup from lc-event-landing.php)

   It sits OUTSIDE #lc-events-app, so it carries its own box-sizing. The
   app's reset is scoped to its own subtree deliberately: a global one is
   known on this site to render links wider than they were asked to be.
   ====================================================================== */
.lc-evh,.lc-evh *{box-sizing:border-box}

/* ---- masthead ---------------------------------------------------------
   The photograph is set in PHP so the transparent header can be guarded on
   it. Height is derived, not chosen: the clearance the overlaid menu needs,
   plus whatever the title block itself measures. No vh, no min-height — a
   reader came here for the calendar and the picture is the ground the type
   stands on, not the destination.

   The clearance is the WORST case, because the storm ribbon rides inside the
   header, arrives asynchronously and wraps to two lines on a phone. Sized to
   the header without it, the first line of the title disappears behind the
   logo the moment weather is running. Sized for it, a quiet day simply gives
   the title more air above it — which costs a photograph nothing. */
.lc-evh{
  --lc-evh-nav:120px;                       /* storm ribbon 40 + navbar 80 */
  --lc-evh-gutter:clamp(20px,4vw,56px);
  position:relative;
  /* The bottom figure is the one place this band is not purely derived, and it is the difference
     between a photograph and a texture. The menu takes 120 of the height before the type starts,
     so a band sized to the title alone leaves the picture a strip barely deeper than the type
     standing on it — at which point the ground it is supposed to provide is just noise. The extra
     sits below the type, where it buys picture rather than empty space. */
  padding:calc(var(--lc-evh-nav) + 26px) var(--lc-evh-gutter) 57px;
  color:#fff;font-family:var(--lc-serif)}
@media(max-width:959px){
  .lc-evh{--lc-evh-nav:152px}               /* ribbon wraps; logo row is 80 */
}
/* Two scrims, each doing one job: the top one keeps the white navigation
   legible over a bright sky, the bottom one holds the title. Kept off the
   middle so the sunset survives. */
.lc-evh::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to bottom,rgba(11,14,20,.52) 0,rgba(11,14,20,.10) 26%,
    rgba(11,14,20,.06) 46%,rgba(11,14,20,.66) 100%)}
.lc-evh__inner{position:relative;z-index:1;max-width:760px}
.lc-evh__title{
  margin:0;font-family:var(--lc-serif);font-weight:700;color:#fff;
  font-size:clamp(38px,4.6vw,58px);line-height:1.02;letter-spacing:-.015em;
  text-shadow:0 2px 18px rgba(0,0,0,.34)}
/* The way past everything above the directory, for a reader who already knows
   what they want. Quiet on purpose — it is a bypass, not an invitation. */
.lc-evh__skip{
  display:inline-flex;align-items:center;gap:8px;margin-top:18px;
  font-family:var(--lc-chrome);text-transform:uppercase;letter-spacing:2px;
  font-weight:600;font-size:10px;color:rgba(255,255,255,.82);text-decoration:none;
  padding-bottom:4px;border-bottom:1px solid rgba(255,255,255,.3);
  transition:color .2s,border-color .2s}
.lc-evh__skip::after{content:"↓";font-size:12px;letter-spacing:0;line-height:1}
.lc-evh__skip:hover{color:#fff;border-bottom-color:#fff}
.lc-evh__skip:focus-visible{outline:2px solid #fff;outline-offset:3px}

/* The anchor lands the tabs below the navigation rather than behind it. */
#lc-events-app{scroll-margin-top:88px}

/* An overlaid header is transparent for the photograph's sake, and UIkit keeps
   it transparent when it fixes the bar on scroll — so past the masthead the
   menu would sit directly on the cards. The ground is added in PHP; the tabs
   park under the fixed bar instead of behind it. Below 960 the mobile header
   is not fixed, so the tabs keep the top edge. */
@media(min-width:960px){ .lc-timebar{top:80px} }

@media(prefers-reduced-motion:reduce){
  .lc-evh__skip{transition:none}
}
@media(prefers-reduced-motion:no-preference){
  html:has(body.lc-events-page){scroll-behavior:smooth}
}

/* ---- The time strip at phone widths ---------------------------------------
   Four buttons at min-width:120px need 480px; a 414 phone gives the bar 399, so
   "THIS MONTH" was cut off with a hidden scrollbar under it — the fourth of four
   time filters, invisible and with nothing to say it was there.

   The strip is sticky, so wrapping to two rows would cost that height on every
   scroll of a directory. Instead the min-width goes and the label is set tighter,
   which fits all four across at 414 with the words intact. */
@media (max-width: 560px) {
  .lc-timebar { overflow-x: visible; }
  .lc-time-btn {
    min-width: 0;
    padding: 16px 3px;
    font-size: 9.5px;
    letter-spacing: .06em;
  }
}
