/* styles.css — WUWM broadcast calendar CHROME.
   Brand palette sampled from the WUWM logos: black #231F20, gold #FFC20E, white.
   The gold is a SPARING accent (active view, focus, today, now-line) — never a fill.

   HARD RULE: this file styles chrome only. It NEVER sets .fc-event background or
   border COLOR — event colors come from the ViewConfig colorMap and are applied
   inline by engine.js. (Only event radius / spacing / weight are touched here.) */

/* Scholar Suite family typeface — Tomorrow (per the UI rules). Imported here so every page that
   loads this stylesheet (WUWM, configs, and all tenant calendars) picks it up in one place. */
@import url('https://fonts.googleapis.com/css2?family=Tomorrow:wght@400;500;600;700&display=swap');

:root {
  --wuwm-black: #231F20;
  --wuwm-gold: #FFC20E;
  --wuwm-gold-rgb: 255,194,14;     /* accent as RGB so rgba(...) tints theme with the accent too */
  --wuwm-gold-soft: #FFF4D2;
  --paper: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #231F20;
  --ink-2: #6B6258;
  --ink-3: #9C9486;
  --hairline: #ECE6DA;
  --hairline-strong: #D9D2C4; --control-line: #D9D2C4;
  --shadow: 0 1px 2px rgba(35,31,32,.04), 0 10px 30px rgba(35,31,32,.06);
  --display: "Tomorrow", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --ui: "Tomorrow", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

html:not([data-theme="hub"]) { --ink-3: #6F695F; --control-line: #8A857C; }   /* Classic only (Hub keeps the :root values): secondary text 4.6:1+ on every Classic surface (WCAG 1.4.3), form-control borders 3.1:1+ against the page (1.4.11); the hairline stays light for decorative rules */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: 110%; }   /* global ~10% size bump — all rem-based text/spacing scales up together */
body {
  font-family: var(--ui);
  color: var(--ink);
  background:
    radial-gradient(1100px 360px at 100% -8%, rgba(var(--wuwm-gold-rgb),.07), transparent 62%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* full-bleed, viewport-height app shell (no page scroll; the calendar scrolls internally) */
#app { max-width: none; margin: 0; padding: 16px 22px 14px; min-height: 100vh; height: 100vh; display: flex; flex-direction: column; }

/* ---------- header ---------- */
header.bc-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  flex: 0 0 auto;
}
.bc-logo { height: 40px; width: auto; display: block; }
.bc-divider { width: 1px; height: 34px; background: var(--hairline-strong); }
.bc-titles { display: flex; flex-direction: column; gap: 3px; }
.bc-titles h1 {
  margin: 0; font-family: var(--display); font-optical-sizing: auto;
  font-weight: 600; font-size: 1.5rem; line-height: 1; letter-spacing: -.012em; color: var(--ink);
}
.bc-titles .bc-sub {
  font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- legend ---------- */
.bc-legend { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-left: 8px; align-items: center; }
.bc-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: .95rem; font-weight: 500; color: var(--ink-2); }   /* legend text bumped ~4pt */
.bc-legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.bc-legend-dot-rule { background: var(--wuwm-black); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }

/* ---------- calendar surface ---------- */
#calendar {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--wuwm-gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px 12px 14px;
  flex: 1 1 auto; min-height: 0;   /* fill remaining viewport height; FC scrolls internally */
}

.fc {
  font-family: var(--ui);
  --fc-border-color: var(--hairline);
  --fc-page-bg-color: transparent;
  --fc-today-bg-color: var(--wuwm-gold-soft);
  --fc-now-indicator-color: var(--wuwm-gold);
  --fc-list-event-hover-bg-color: #FBF6EC;
  --fc-button-text-color: var(--ink-2);
  --fc-button-bg-color: transparent;
  --fc-button-border-color: transparent;
  --fc-button-hover-bg-color: #F2ECE0;
  --fc-button-hover-border-color: transparent;
  --fc-button-active-bg-color: #ffffff;
  --fc-button-active-border-color: var(--hairline-strong);
}
.fc a { color: inherit; text-decoration: none; }

/* toolbar */
.fc .fc-toolbar.fc-header-toolbar { margin: 14px 6px 20px; align-items: center; }
.fc .fc-toolbar-title { font-family: var(--display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; color: var(--ink); }

/* buttons -> ghost / refined (kills the blocky solid look) */
.fc .fc-button {
  border-radius: 8px; font-family: var(--ui); font-weight: 500; font-size: .82rem;
  text-transform: none; padding: .44em .82em; box-shadow: none !important;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.fc .fc-button-primary:hover { color: var(--ink); }
.fc .fc-button-primary:not(:disabled):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--wuwm-gold-rgb),.5) !important; }
.fc .fc-button-primary:disabled { color: var(--ink-3); opacity: 1; }
.fc .fc-button-primary:not(:disabled).fc-button-active {
  color: var(--ink); box-shadow: inset 0 -2px 0 var(--wuwm-gold) !important;
}
.fc .fc-today-button:not(:disabled) { border-color: var(--hairline-strong); color: var(--ink); }
.fc .fc-icon { font-size: 1.35em; }

/* month/week column headers */
.fc .fc-col-header-cell-cushion { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 12px 4px; }   /* date headers bumped up */
.fc-theme-standard .fc-scrollgrid { border-color: var(--hairline); }
.fc .fc-daygrid-day-number { font-size: .8rem; color: var(--ink-2); padding: 7px 9px; }
.fc .fc-day-today .fc-daygrid-day-number { color: var(--ink); font-weight: 700; }

/* events: spacing / weight ONLY — never color */
.fc .fc-event { border-radius: 5px; font-size: calc(.8rem * var(--bc-event-scale, 1)); padding: 1px 3px; }
/* A timed event's height is fixed by its duration, so extra content ("fields on the event") is
   contained in the colored box — scrolls within it when it doesn't fit, rather than spilling onto the
   grid. Scoped to the content wrapper so FullCalendar's resize handle (a sibling) still works. */
.fc-timegrid-event .fc-event-main { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.5) transparent; }
.fc-timegrid-event .fc-event-main::-webkit-scrollbar { width: 6px; }
.fc-timegrid-event .fc-event-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,.45); border-radius: 3px; }
.fc .fc-event-title { font-weight: 500; }
/* Detail-field lines (fields-on-event): wrap within the box, never run past its right edge. */
.bc-event-fields, .bc-event-field { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.fc-event.bc-bold, .fc-event.bc-bold .fc-event-title { font-weight: 700; }
.fc-event.bc-strike .fc-event-title { text-decoration: line-through; }

/* list view */
.fc .fc-list { border: none; }
.fc .fc-list-day-cushion { background: transparent; padding: 18px 6px 6px; }
.fc-theme-standard .fc-list-day-cushion { border-top: 1px solid var(--hairline); }
.fc .fc-list-day-text, .fc .fc-list-day-side-text {
  font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--ink); text-transform: none;
}
.fc .fc-list-table td { padding: 10px 14px; border-color: var(--hairline); }
.fc .fc-list-event-time { color: var(--ink-3); font-size: calc(.78rem * var(--bc-event-scale, 1)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc .fc-list-event-title { color: var(--ink); font-size: calc(1em * var(--bc-event-scale, 1)); }
.fc .fc-list-event-graphic { padding-right: 2px; }

/* list-view group sub-header rows (Day -> Group -> rows) */
.bc-list-group-row td {
  background: transparent; border: none; padding: 13px 14px 3px;
  font-size: .64rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
}
.bc-group-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(0,0,0,.09); }
/* second-level sub-group header (Day -> Group -> Sub-group -> rows) */
.bc-list-subgroup-row td {
  background: transparent; border: none; padding: 4px 14px 2px 30px;
  font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.bc-list-subgroup-row td::before { content: "└ "; color: var(--hairline-strong); font-weight: 400; }

@media (max-width: 640px) {
  #app { height: auto; padding: 14px 14px 24px; }   /* mobile: natural page scroll */
  .bc-legend { margin-left: 0; width: 100%; }
  .fc .fc-toolbar.fc-header-toolbar { flex-direction: column; gap: 10px; }
}

/* ===================== Tier 2: settings drawer ===================== */
/* keep the legend + gear clustered on the right; gear last */
.bc-legend { order: 1; }
/* right-aligned masthead cluster: [filter status] [Sign out] [gear] */
.bc-head-right { order: 5; margin-left: auto; display: flex; align-items: center; gap: 12px; }

.bc-signout {
  font-size: .74rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--hairline);
  white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.bc-signout:hover { background: #F2ECE0; color: var(--ink); border-color: var(--hairline-strong); }

.bc-gear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: transparent; border: 1px solid var(--hairline); color: var(--ink-2);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.bc-gear:hover { background: #F2ECE0; color: var(--ink); }
.bc-gear:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--wuwm-gold-rgb),.5); }
.bc-gear[aria-expanded="true"] { border-color: var(--hairline-strong); color: var(--ink); box-shadow: inset 0 -2px 0 var(--wuwm-gold); }

.bc-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 820px; max-width: 96vw;
  background: var(--surface); border-left: 1px solid var(--hairline);
  box-shadow: -16px 0 40px rgba(35,31,32,.10);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.22,.61,.36,1);
  z-index: 60; display: flex; flex-direction: column; font-family: var(--ui);
}
.bc-drawer.open { transform: translateX(0); }
.bc-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--hairline); flex: 0 0 auto;
}
.bc-drawer-head h2 { margin: 0; flex: 1; font-family: var(--display); font-weight: 600; font-size: 1.18rem; color: var(--ink); }
.bc-saved {
  font-size: .72rem; font-weight: 600; color: #2E7D46; white-space: nowrap; margin-right: 8px;
  opacity: 0; transform: translateY(-2px); transition: opacity .2s ease, transform .2s ease;
}
.bc-saved.show { opacity: 1; transform: none; }
.bc-autosave-note { margin-top: 4px; color: var(--ink-3); font-style: italic; }
.bc-drawer-close {
  background: transparent; border: none; font-size: 1.5rem; line-height: 1; color: var(--ink-3);
  cursor: pointer; width: 32px; height: 32px; border-radius: 8px;
}
.bc-drawer-close:hover { background: #F2ECE0; color: var(--ink); }
.bc-drawer-body { overflow-y: auto; padding: 6px 22px 22px; flex: 1 1 auto; }

/* tabbed settings */
.bc-tabbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0 10px; margin-bottom: 4px; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.bc-tab { font-family: var(--ui); font-size: 1.08rem; font-weight: 600; color: var(--ink-3); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; cursor: pointer; }
.bc-tab:hover { background: #F2ECE0; color: var(--ink-2); }
.bc-tab.active { color: var(--ink); background: var(--wuwm-gold-soft); box-shadow: inset 0 -2px 0 var(--wuwm-gold); }
.bc-tabcontent { padding-top: 6px; max-width: 720px; }
/* much larger, accessible text inside the panel (~2x). .bc-drawer-body prefix beats the
   base drawer rules regardless of source order. */
.bc-drawer-body .bc-section > h3 { font-size: 1.06rem; }
.bc-drawer-body .bc-subhead { font-size: 1.45rem; margin: 22px 0 10px; }
.bc-drawer-body .bc-row { padding: 12px 0; }
.bc-drawer-body .bc-row-label { font-size: 1.4rem; }
.bc-drawer-body .bc-hint { font-size: 1.18rem; line-height: 1.55; }
.bc-drawer-body .bc-select, .bc-drawer-body .bc-seg-btn { font-size: 1.28rem; padding: 9px 13px; }
.bc-drawer-body .bc-check { width: 24px; height: 24px; }
.bc-drawer-body .bc-color { width: 54px; height: 34px; }
.bc-drawer-body .bc-add-btn, .bc-drawer-body .bc-text, .bc-drawer-body .bc-num { font-size: 1.18rem; padding: 9px 13px; }
.bc-drawer-head h2 { font-size: 1.85rem; }
.bc-drawer-body .bc-rule-summary { font-size: 1.18rem; }
.bc-drawer-body .bc-rule-kw { font-size: .9rem; flex-basis: 46px; }
.bc-drawer-body .bc-rule-line .bc-select, .bc-drawer-body .bc-filter-row .bc-select { font-size: 1.12rem; }
.bc-drawer-body .bc-cfg-name { font-size: 1.2rem; }
/* saved-configuration list */
.bc-cfg-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bc-cfg-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 9px; background: #FCFBF8; }
.bc-cfg-name { font-size: .92rem; color: var(--ink); font-weight: 500; }
.bc-drawer-foot {
  flex: 0 0 auto; display: flex; gap: 10px; padding: 13px 22px calc(13px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline); background: var(--surface);
}
.bc-reset-btn, .bc-done-btn {
  flex: 1; font-family: var(--ui); font-size: .82rem; font-weight: 600;
  border-radius: 9px; padding: 10px 14px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.bc-reset-btn { color: var(--ink-2); background: #fff; border: 1px solid var(--hairline-strong); }
.bc-reset-btn:hover { background: #FBE9E6; color: #8A3B30; border-color: #F2C9C2; }
.bc-done-btn { color: #fff; background: var(--ink); border: 1px solid var(--ink); }
.bc-done-btn:hover { background: #000; }
.bc-reset-btn:focus-visible, .bc-done-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--wuwm-gold-rgb),.45); }

.bc-section { padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.bc-section:last-child { border-bottom: none; }
.bc-section > h3 {
  margin: 0 0 12px; font-size: .68rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-3);
}
.bc-subhead { margin: 16px 0 8px; font-size: .82rem; font-weight: 600; color: var(--ink); }
.bc-subhead:first-of-type { margin-top: 2px; }
.bc-hint { font-size: .74rem; color: var(--ink-3); margin: 0 0 10px; }

.bc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.bc-row-label { font-size: .85rem; color: var(--ink); }
.bc-color { width: 38px; height: 26px; padding: 0; border: 1px solid var(--control-line); border-radius: 6px; background: none; cursor: pointer; }
.bc-check { width: 17px; height: 17px; accent-color: var(--wuwm-gold); cursor: pointer; }
.bc-select {
  font-family: var(--ui); font-size: .82rem; color: var(--ink); padding: 6px 10px;
  border: 1px solid var(--control-line); border-radius: 8px; background: #fff; cursor: pointer;
}
.bc-select:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--wuwm-gold-rgb),.45); }

.bc-seg { display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: 9px; overflow: hidden; }
.bc-seg-btn {
  font-family: var(--ui); font-size: .78rem; text-transform: capitalize; padding: 6px 14px;
  background: #fff; border: none; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.bc-seg-btn + .bc-seg-btn { border-left: 1px solid var(--hairline); }
.bc-seg-btn.active { background: var(--ink); color: #fff; }

/* density (compact tightens chrome spacing only; engine output unchanged) */
.bc-density-compact .fc .fc-list-table td { padding: 6px 14px; }
.bc-density-compact .fc-event { font-size: calc(.76rem * var(--bc-event-scale, 1)); padding: 0 3px; }
.bc-density-compact .fc .fc-list-day-cushion { padding: 12px 6px 4px; }
.bc-density-compact .bc-list-group-row td { padding: 9px 14px 2px; }
.bc-density-compact .fc .fc-daygrid-day-number { padding: 4px 6px; }

/* event detail popover */
.bc-popover {
  position: absolute; z-index: 70; min-width: 220px; max-width: 320px;
  max-height: calc(100vh - 24px); overflow-y: auto;   /* long editors scroll instead of overflowing */
  background: #fff; border: 1px solid var(--hairline-strong); border-radius: 10px;
  box-shadow: var(--shadow); padding: 12px 14px; font-family: var(--ui);
}
.bc-popover-title { font-weight: 600; font-size: .9rem; color: var(--ink); padding-left: 9px;
  border-left: 3px solid var(--wuwm-gold); margin-bottom: 8px; }
.bc-popover-row { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.bc-popover-key { color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-size: .66rem; font-weight: 700; padding-top: 2px; }
.bc-popover-val { color: var(--ink); text-align: right; font-size: .8rem; }
.bc-popover-empty { font-size: .78rem; color: var(--ink-3); }
/* edit mode (write tier) */
.bc-popover-input { font-family: var(--ui); font-size: .8rem; padding: 3px 7px; border: 1px solid var(--control-line); border-radius: 6px; min-width: 130px; text-align: right; }
select.bc-popover-input { text-align: left; background: #fff; cursor: pointer; }
input[type="date"].bc-popover-input { text-align: left; }
.bc-popover-check { width: 18px; height: 18px; accent-color: var(--wuwm-gold); cursor: pointer; }

/* ---------- toolbar dropdown menus (View / Filters) ---------- */
.bc-tb-menu {
  position: absolute; z-index: 80; min-width: 300px; max-width: 580px;
  max-height: 80vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--hairline-strong); border-radius: 10px;
  box-shadow: var(--shadow); padding: 12px; font-family: var(--ui);
}
.bc-tb-menu.bc-tb-wide { width: min(1080px, 96vw); max-width: 96vw; padding: 22px 24px; }
.bc-tb-h { font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 16px 6px 7px; }
.bc-tb-empty { font-size: 1.08rem; color: var(--ink-3); padding: 4px 6px 10px; }
.bc-tb-item { display: block; width: 100%; text-align: left; font-family: var(--ui); font-size: 1.05rem; color: var(--ink); background: transparent; border: none; border-radius: 7px; padding: 11px 12px; cursor: pointer; }
.bc-tb-item:hover { background: #F2ECE0; }
.bc-tb-item.active { font-weight: 700; box-shadow: inset 2px 0 0 var(--wuwm-gold); }
.bc-tb-clear { color: #8A3B30; }
.bc-tb-frow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 4px; }
.bc-tb-select { flex: 1 1 150px; min-width: 140px; font-family: var(--ui); font-size: 1.12rem; padding: 13px 15px; border: 1px solid var(--control-line); border-radius: 8px; background: #fff; }
.bc-tb-valsel { flex: 2 1 300px; }   /* the filter VALUE field — give it ~2x the room */
.bc-tb-x { flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid var(--hairline); border-radius: 8px; background: #fff; color: var(--ink-3); cursor: pointer; font-size: 1.45rem; line-height: 1; }
.bc-tb-x:hover { background: #FBE9E6; color: #8A3B30; }
.bc-tb-savedname { flex: 1 1 auto; text-align: left; font-size: 1.12rem; color: var(--ink); border: none; border-radius: 6px; padding: 9px 8px; }
.bc-tb-saverow { margin-top: 7px; }
.bc-tb-input { flex: 1 1 auto; min-width: 0; font-family: var(--ui); font-size: 1.12rem; padding: 13px 16px; border: 1px solid var(--control-line); border-radius: 8px; }
.bc-tb-savebtn { flex: 0 0 auto; font-family: var(--ui); font-size: 1.05rem; font-weight: 600; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 8px; padding: 12px 22px; cursor: pointer; }
.bc-tb-savebtn:hover { background: #000; }
.bc-tb-savebtn:disabled { opacity: .45; cursor: default; }
/* View / Filters dropdown buttons + active-filter highlight */
.fc .fc-bcViews-button, .fc .fc-bcFilters-button { font-weight: 600; }
.fc .fc-bcFilters-button.bc-tb-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--wuwm-gold) !important; }
/* one-click Clear filters, sits between Filters and Print. Hidden by default (so a freshly
   re-rendered toolbar button stays hidden); updateToolbarLabels reveals it when filters are on. */
.fc .fc-bcClearFilters-button { display: none; font-size: .78rem; color: #8A3B30; font-weight: 600; margin-left: 8px; }
.fc .fc-bcClearFilters-button:hover { color: #6E2A22; }
/* Print / PNG: lighter + separated, distinct from the dropdowns */
.fc .fc-bcPrint-button, .fc .fc-bcPng-button { font-size: .74rem; color: var(--ink-3); font-weight: 500; }
.fc .fc-bcPrint-button { margin-left: 12px; }
.fc .fc-bcPrint-button:hover, .fc .fc-bcPng-button:hover { color: var(--ink); }
.fc .fc-bcRefresh-button { font-size: .8rem; color: var(--ink-3); font-weight: 500; margin-left: 8px; }
.fc .fc-bcRefresh-button:hover { color: var(--ink); }
.fc .fc-bcRefresh-button.bc-refreshing { opacity: .5; }
/* search + go-to-date: quiet, like Refresh; Search highlights when a query is active */
.fc .fc-bcSearch-button, .fc .fc-bcDate-button { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.fc .fc-bcSearch-button:hover, .fc .fc-bcDate-button:hover { color: var(--ink); }
.fc .fc-bcSearch-button.bc-tb-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--wuwm-gold) !important; }
/* clickable legend (D3): click a swatch to filter to that value */
.bc-legend-click { cursor: pointer; border-radius: 999px; padding: 2px 9px; }
.bc-legend-click:hover { background: rgba(var(--wuwm-gold-rgb), .16); }
.bc-legend-active { background: rgba(var(--wuwm-gold-rgb), .24); font-weight: 700; box-shadow: inset 0 0 0 1px var(--hairline-strong); }
/* loading + data-error affordances (C6) */
#bc-loading { display: none; align-items: center; justify-content: center; gap: 10px; padding: 16px; color: var(--ink-2); font-size: .92rem; }
.bc-spinner { width: 18px; height: 18px; border: 2px solid var(--hairline-strong); border-top-color: var(--wuwm-gold); border-radius: 50%; display: inline-block; animation: bc-spin .7s linear infinite; }
@keyframes bc-spin { to { transform: rotate(360deg); } }
#bc-data-error { display: none; align-items: center; gap: 12px; margin: 0 2px 10px; padding: 10px 14px; font-size: .86rem; color: #8A3B30; background: #FBE9E6; border: 1px solid #F2C9C2; border-radius: 8px; }
.bc-data-retry { font-family: var(--ui); font-size: .82rem; font-weight: 600; color: #fff; background: #8A3B30; border: none; border-radius: 6px; padding: 6px 13px; cursor: pointer; }
.bc-data-retry:hover { background: #6E2A22; }
/* branding tab: logo upload preview */
.bc-drawer-body .bc-logo-upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 4px; }
.bc-logo-preview { height: 44px; max-width: 200px; width: auto; border: 1px solid var(--hairline); border-radius: 7px; background: #fff; padding: 5px 8px; object-fit: contain; }
.bc-accent-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.bc-accent-swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bc-accent-swatch.active { border-color: var(--ink); }
/* Smartsheet-like filter builder */
.bc-tb-conj { flex: 0 0 auto; font-size: .92rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); min-width: 54px; }
.bc-tb-applybtn { flex: 0 0 auto; font-family: var(--ui); font-size: 1.02rem; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 11px 20px; cursor: pointer; }
.bc-tb-applybtn:hover { background: #F2ECE0; }
.bc-popover-input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--wuwm-gold-rgb),.45); }
.bc-popover-readonly { color: var(--ink-3); }
.bc-popover-msg { font-size: .72rem; color: var(--ink-3); margin-top: 8px; min-height: 1em; }
.bc-pop-reauth { color: #8A6D26; font-weight: 700; text-decoration: underline; cursor: pointer; }
.bc-pop-reauth:hover { color: var(--ink); }
.bc-popover-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.bc-pop-btn { font-family: var(--ui); font-size: .76rem; font-weight: 600; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--hairline-strong); background: #fff; color: var(--ink-2); cursor: pointer; }
.bc-pop-btn:hover { background: #F2ECE0; color: var(--ink); }
.bc-pop-save { background: var(--ink); color: #fff; border-color: var(--ink); }
.bc-pop-save:hover { background: #000; }
.bc-pop-save:disabled { opacity: .6; cursor: default; }

/* filter status affordance ("X of N shown") — a quiet neutral pill in the masthead */
#bc-filter-status {
  font-size: .82rem; color: var(--ink-2); padding: 5px 12px; white-space: nowrap;
  background: #fff; border: 1px solid var(--hairline-strong); border-radius: 999px;
}
/* a zero-match filter stays a soft red warning (not yellow) so "showing nothing" is obvious */
#bc-filter-status.bc-filter-status-empty { background: #FBE9E6; border-color: #F2C9C2; color: #8A3B30; font-weight: 600; }

/* filters surface */
.bc-filter-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.bc-filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bc-filter-conj { flex: 0 0 auto; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); min-width: 46px; }
.bc-filter-row .bc-select { flex: 1 1 30%; min-width: 0; font-size: .76rem; padding: 5px 7px; }
.bc-add-btn {
  font-family: var(--ui); font-size: .78rem; color: var(--ink); background: #fff;
  border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.bc-add-btn:hover { background: #F2ECE0; }
.bc-del-btn {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--hairline);
  background: #fff; color: var(--ink-3); font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.bc-del-btn:hover { background: #FBE9E6; color: #8A3B30; border-color: #F2C9C2; }

/* conditional rules editor */
.bc-rule-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.bc-rule-card { border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 11px; background: #FCFBF8; }
.bc-rule-card.bc-rule-off { opacity: .5; }
.bc-rule-head { display: flex; align-items: flex-start; gap: 8px; }
.bc-rule-summary { flex: 1; min-width: 0; font-size: .76rem; font-weight: 600; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; padding-top: 1px; }
.bc-order-btn { width: 24px; height: 24px; border: 1px solid var(--hairline); border-radius: 6px; background: #fff; color: var(--ink-2); cursor: pointer; font-size: .82rem; line-height: 1; }
.bc-order-btn:disabled { opacity: .35; cursor: default; }
.bc-order-btn:not(:disabled):hover { background: #F2ECE0; color: var(--ink); }
.bc-rule-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.bc-rule-kw { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); flex: 0 0 34px; }
.bc-rule-line .bc-select { flex: 1 1 28%; min-width: 0; font-size: .74rem; padding: 4px 6px; }
.bc-then-params { display: inline-flex; align-items: center; gap: 4px; }
.bc-num { width: 52px; font-family: var(--ui); font-size: .76rem; padding: 4px 6px; border: 1px solid var(--control-line); border-radius: 7px; }
.bc-unit { font-size: .76rem; color: var(--ink-3); }
.bc-rule-nomatch { margin-top: 8px; font-size: .7rem; color: #8A6D26; background: var(--wuwm-gold-soft); border: 1px solid #F0DFA8; border-radius: 6px; padding: 4px 8px; }
/* live preview chip for a rule's effect */
.bc-rule-preview { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 3px 8px; border-radius: 5px; font-size: .72rem; font-weight: 500; white-space: nowrap; }
.bc-rule-preview-badge { font-size: .56rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; line-height: 1; padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.92); color: #231F20; }
.bc-text { font-family: var(--ui); font-size: .76rem; padding: 4px 7px; border: 1px solid var(--control-line); border-radius: 7px; width: 88px; }

/* rule-effect badges rendered on events (A1) */
.bc-badges { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.bc-badge {
  font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.92); color: #231F20;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}
.fc-list-event .bc-badge { background: var(--wuwm-black); color: #fff; box-shadow: none; }

/* The rest of this sheet (empty states, print, Config Page, grouped grid, saving modal, accessibility +
   responsive) is styles-late.css, linked right after this file so the cascade order is unchanged. */
