/* The Perth venue directory (scripts/render_directory.ts, canvas "Eventier · Simpler venue directory").
   Loaded after site.css, only by the directory's pages. Names avoid site.css's own (.page, .chip, .more, .small). */

/* The top bar's button steps back, so the page's own button is the one that stands out. */
.pill-cta.quiet { background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- The list ---------- */
.dir-head { display: flex; flex-direction: column; gap: 10px; }
.dir-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 72px); line-height: 1; }
.dir-lede { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); }

.dir-search { display: flex; flex-wrap: wrap; gap: 12px; }
.dir-search input, .dir-search select { height: 56px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); padding: 0 16px; font: inherit; font-size: 17px; color: var(--ink); }
.dir-search input { flex: 1 1 360px; min-width: 0; padding: 0 18px; }
.dir-search select { flex: 1 1 190px; min-width: 0; }
.dir-search input:focus-visible, .dir-search select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.dir-go { height: 56px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--ink); color: var(--on-ink); font: inherit;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .16s var(--ease); }
.dir-go:active { transform: scale(.97); }
/* With JavaScript the list answers as you type and choose; the button is only for pages without it. */
.dir-live .dir-go { display: none; }

.dir-count { margin: 0; font-size: 15px; color: var(--muted); }
.dir-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 24px; }
.dir-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dir-card img, .dir-card .no-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px;
  background: var(--panel); transition: transform .2s var(--ease); }
.dir-card:hover img { transform: scale(1.01); }
.site .dir-name { margin-top: 2px; font-size: 21px; font-weight: 700; line-height: 1.25; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
/* The whole card is the link. */
.dir-name::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.dir-name:focus-visible { outline: none; }
.dir-card:has(.dir-name:focus-visible) { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 18px; }
.dir-meta { font-size: 15px; color: var(--muted); }
.dir-none { grid-column: 1 / -1; margin: 0; font-size: 17px; color: var(--ink-2); }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.site .pager .pg { min-width: 44px; height: 44px; box-sizing: border-box; display: inline-grid; place-items: center; padding: 0 12px;
  border-radius: 12px; color: var(--ink); text-decoration: none; }
.site .pager .pg:hover { background: var(--panel); }
.site .pager .pg.on { background: var(--ink); color: var(--on-ink); }
.pager .gap { color: var(--muted); }

.dir-browse { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.dir-browse p { margin: 0; }
.dir-browse summary { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; color: var(--ink-2); }
.dir-browse-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 20px; }
.dir-browse-lists ul { list-style: none; margin: 0; padding: 0; }
.dir-browse-lists a { display: inline-flex; align-items: center; min-height: 40px; }
.dir-legal { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ---------- One venue (its own page, and the panel beside the list) ---------- */
.venue { display: flex; flex-direction: column; background: var(--card); border-radius: 24px; overflow: hidden; max-width: 760px; }
.venue-photo { margin: 0; position: relative; }
.venue-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--panel); }
.venue-photo figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(27, 26, 23, .6);
  color: var(--on-ink); font-size: 12px; }
.site .venue-photo figcaption a { color: inherit; }
.venue-body { padding: 26px 32px 30px; display: flex; flex-direction: column; gap: 14px; }
.venue-meta { margin: 0; font-size: 14px; color: var(--muted); }
.venue-name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 6vw, 46px); line-height: 1; overflow-wrap: anywhere; }
.venue-address { margin: 0; font-size: 15px; color: var(--ink-2); }
.site .btn-cta { margin-top: 6px; min-height: 56px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 8px 24px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 17px; text-decoration: none;
  transition: transform .16s var(--ease); }
.site .btn-cta:hover { color: var(--on-ink); }
.site .btn-cta:active { transform: scale(.97); }
.venue-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.venue-spaces { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--panel); }
.venue-spaces li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--panel); font-size: 16px; }
.venue-spaces li span:first-child { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.venue-spaces li span:last-child { flex-shrink: 0; color: var(--muted); text-align: right; }
.venue-links { margin: 0; font-size: 14px; color: var(--muted); }
.site .venue-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* On a phone the venue's button stays in reach at the bottom. */
.sticky-cta { display: none; }
@container site (max-width: 760px) {
  .venue { border-radius: 18px; }
  .venue-body { padding: 20px 18px 24px; }
  .venue-body > .btn-cta, .venue-note { display: none; }
  .sticky-cta { display: flex; flex-direction: column; gap: 6px; position: sticky; bottom: 0; z-index: 20; margin: 0 -16px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--panel); }
  .sticky-cta .btn-cta { margin: 0; }
  .sticky-cta p { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
}

/* The panel (public/assets/directory.js): beside the list on a wide screen; on a phone the card is a plain link. */
.dir-panel { position: fixed; inset: 0; z-index: 100; margin: 0; padding: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  border: 0; background: transparent; }
.dir-panel::backdrop { background: rgba(27, 26, 23, .45); }
.dir-panel-inner { position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 100%); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); transition: transform .26s cubic-bezier(.32, .72, 0, 1); }
@starting-style { .dir-panel[open] .dir-panel-inner { transform: translateX(100%); } }
.dir-panel .venue { max-width: none; border-radius: 0; }
.dir-panel .sticky-cta { display: none; }
.dir-close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--on-ink); display: grid; place-items: center; cursor: pointer; }
.dir-close:active { transform: scale(.95); }
@media (prefers-reduced-motion: reduce) {
  .dir-panel-inner, .dir-card img { transition: none; }
}
