/* =========================================================================
   Chairday directory (milestone 7). Additions to the Daylight kit only:
   the Leaflet map in kit style, place lists, the no-JS filter button and the
   A4 letters. Kit tokens only, so light and dark themes both work.
   ========================================================================= */

/* Leaflet map in the kit's .cd-map frame */
.dir-map { min-height: 280px; background: var(--cd-map-land); z-index: 0; }
.dir-map.cd-map--tall { min-height: min(720px, calc(100dvh - 120px)); }
.dir-map .leaflet-container, .dir-map.leaflet-container { font: 500 0.75rem/1.4 var(--cd-font-ui); background: var(--cd-map-land); }
.dir-map .leaflet-control-attribution { background: var(--cd-glass); color: var(--cd-text); }
.dir-map .leaflet-control-attribution a { color: var(--cd-text); font-weight: 600; }
.dir-map .leaflet-popup-content-wrapper, .dir-map .leaflet-popup-tip { background: var(--cd-surface); color: var(--cd-text); box-shadow: var(--cd-shadow-2); }
.dir-map .leaflet-popup-content a { color: var(--cd-text); font-weight: 700; }
.dir-map .leaflet-bar a { background: var(--cd-surface); color: var(--cd-text); border-color: var(--cd-border); }

/* Pins drawn like .cd-map__pin (Leaflet positions them; no inline styles in markup) */
.dir-pin { background: none; border: 0; }
.dir-pin__body {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--cd-surface-sunk); color: var(--cd-text); border: 1.5px dashed var(--cd-border-strong);
  box-shadow: var(--cd-shadow-2);
}
.dir-pin__body > span { transform: rotate(45deg); font: 800 0.75rem/1 var(--cd-font-display); }
.dir-pin--bookable .dir-pin__body { background: var(--cd-primary); color: var(--cd-on-primary); border: 0; }

/* Decision 042: a Chairday business's own logo on its card and listing page (as business.css
   draws it on the booking site: white behind the logo in both themes, so it reads) */
.cd-bizmark--logo { background: #FFFFFF; padding: calc(var(--s) * 0.08); }
.cd-bizmark--logo img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* The static credit is replaced by Leaflet's attribution once the map loads */
.dir-map--live > .cd-map__credit { display: none; }

/* Filter "Apply" button is the no-JavaScript fallback */
.dir-js .dir-js-hide { display: none; }

/* Category hub: towns and cities */
.dir-places { list-style: none; margin: 0; padding: 0; }
.dir-place { display: flex; flex-direction: column; gap: 4px; padding: 16px; text-decoration: none; color: var(--cd-text); }
.dir-tag--on { background: var(--cd-primary); color: var(--cd-on-primary); border-color: var(--cd-primary); }
.dir-disclosure { max-width: 70ch; }
.dir-notify-area { margin-top: 16px; text-align: left; }

/* A4 letters (admin print view) */
.dir-letter { background: var(--cd-bg); color: var(--cd-text); font: 400 11pt/1.5 var(--cd-font-ui); margin: 0; }
.dir-letter__page { box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 22mm 20mm; background: var(--cd-surface); }
.dir-letter__page h1 { font: 800 15pt/1.3 var(--cd-font-display); margin: 10mm 0 4mm; }
.dir-letter__from { text-align: right; margin: 0 0 12mm; }
.dir-letter__to { margin: 0 0 10mm; }
.dir-letter__code { font: 500 24pt/1 var(--cd-font-mono); letter-spacing: 0.3em; margin: 6mm 0; }
@media print {
  @page { size: A4; margin: 0; }
  .dir-letter { background: none; }
  .dir-letter__page { margin: 0; background: none; }
}

/* Improvement round 1: an empty category page still explains and invites */
.dir-how { display: grid; gap: 24px; }
.dir-how__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); counter-reset: how; }
.dir-how__steps li { display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: 20px; background: var(--cd-surface); border: 1px solid var(--cd-border); box-shadow: var(--cd-shadow-1); }
.dir-how__steps b { font: 800 1.125rem/1.25 var(--cd-font-display); }
.dir-how__steps span:last-child { color: var(--cd-text-muted); font-size: 0.9375rem; line-height: 1.5; }
.dir-how__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 14px; background: var(--cd-accent-soft); color: var(--cd-attention); }
.dir-how__icon .cd-icon { width: 22px; height: 22px; }
.dir-how__biz { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: 20px; background: var(--cd-primary); color: var(--cd-on-primary); }
.dir-how__biz p { margin: 0; max-width: 60ch; }
.dir-how__biz b { font-family: var(--cd-font-display); font-size: 1.125rem; }
