/* style.css — the chat map's own look. The fold card comes from
   ../topicmap/style.css (the shared topic map stylesheet), the chat window
   from ./panel.css; this file adds the right-hand control stack (the
   walking-tour apps' round buttons, in this site's surfaces), the chat
   lines in the card and the avatars on the map. The accent is the site's
   own day blue (/style.css). */
:root {
  --accent: #0067c5; --control: 44px;
  /* the chat window (chat/panel.css) in this page's colours */
  --chat-bg: var(--paper); --chat-fg: var(--ink); --chat-line: var(--line); --chat-accent: var(--accent); --chat-dim: #52606d; --chat-input-bg: #fff;
}

/* Keep the neighborhood card below the top-left zoom/compass control. */
.topleft { top: 112px; max-height: calc(100% - 124px); }

/* the control stack: top right, round buttons, same order as the tour apps */
.stack { position: absolute; right: 12px; top: 12px; z-index: 5; display: flex; flex-direction: column; gap: 10px; }
.round {
  width: var(--control); height: var(--control); padding: 0; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.15);
  font: inherit; font-size: 18px; font-weight: 700;
}
.round svg { width: 20px; height: 20px; fill: currentColor; }
.round-text { font-size: 13px; }
.round:hover { background: #f0f2f4; }
.round:active { opacity: .7; }
.round.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.round:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack :is(.chat-control,.day-plan-control,.apps-control,.media-control) { gap: 0; align-content: center; font-size: 8px; line-height: 12px; }
:is(.chat-control,.day-plan-control,.apps-control,.media-control) svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Keep controls scrollable above the attribution on short screens. */
@container page (max-height: 600px) {
  .stack { max-height: calc(100% - 52px); overflow-y: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
  .stack::-webkit-scrollbar { display: none; }
  .stack .round { flex-shrink: 0; }
}

/* Apps and Media use the former site menu catalog and category order. */
.catalog-panel { position: absolute; top: 12px; right: 68px; z-index: 7; box-sizing: border-box; width: min(340px,calc(100% - 80px)); max-height: calc(100% - 24px); overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 3px 15px var(--shadow); font: 13px/1.4 system-ui,sans-serif; }
.catalog-panel[hidden] { display: none; }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.catalog-heading h2 { margin: 0; font-size: 18px; }
.catalog-close { flex: none; width: 32px; height: 32px; font: 22px/1 system-ui,sans-serif; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--finish-raised); cursor: pointer; }
:is(.catalog-panel,.catalog-content) a { display: block; padding: 9px 4px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
:is(.catalog-panel,.catalog-content) > a { color: var(--accent); font-weight: 600; }
:is(.catalog-panel,.catalog-content) details { border-top: 1px solid var(--border); }
:is(.catalog-panel,.catalog-content) summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 4px; cursor: pointer; font-weight: 600; list-style: none; }
:is(.catalog-panel,.catalog-content) summary::-webkit-details-marker { display: none; }
:is(.catalog-panel,.catalog-content) summary::after { content: '›'; font-size: 20px; line-height: 1; transition: transform .2s ease; }
:is(.catalog-panel,.catalog-content) details[open] > summary::after { transform: rotate(90deg); }
:is(.catalog-panel,.catalog-content) ul { list-style: none; margin: 0; padding: 0 0 8px 12px; }
:is(.catalog-panel,.catalog-content) :is(a,summary):hover { color: var(--accent); background: var(--finish-hover); }
:is(.catalog-panel,.catalog-content) :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catalog-status { margin: 8px 4px; color: var(--muted); }
.catalog-status:empty { display: none; }

/* the card: who you are, where you are, who is here, the two buttons */
.you { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 2px; font-size: 13px; }
.you .handle { font-weight: 600; }
.you .small { margin-left: 6px; font: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; color: #52606d; }
.room-line { margin: 4px 0 0; font-size: 13px; }
.people-line { margin: 2px 0 4px; font-size: 12px; color: #52606d; }
/* an empty line takes no room (the card stays tight) */
.room-line:empty, .people-line:empty { display: none; }
.chat-btns { display: flex; gap: 6px; margin-bottom: 4px; }
.chat-btns button { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; cursor: pointer; }
.chat-btns button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.chat-btns button:disabled { opacity: .45; cursor: default; }
.chat-btns button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the business list: the neighborhood row, then a fold per category */
.place-list { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; }
.place-list details { margin: 0; }
.place-list summary { cursor: pointer; padding: 3px 0; list-style: none; color: #52606d; }
/* the six groups read a little stronger; their categories sit one step in */
.place-group > summary { color: var(--ink); font-weight: 600; }
.place-category { padding-left: 12px; }
.users-fold .user-row { padding-left: 12px; }
.place-list summary::-webkit-details-marker { display: none; }
.place-list summary::before { content: '\25B8'; display: inline-block; width: 12px; }
.place-list details[open] summary::before { content: '\25BE'; }
.place-row { display: flex; width: 100%; padding: 2px 0 2px 24px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.place-row.is-neighborhood { padding-left: 0; font-weight: 600; }
.place-row .place-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-row .here { flex: none; margin-left: 6px; color: #52606d; }
.place-row.is-current { color: var(--accent); font-weight: 600; }
.place-row:hover { color: var(--accent); }
.place-credit { margin-top: 6px; font-size: 10px; color: #52606d; }

/* a business's popup: its name, address, and three link buttons */
.place-popup h3 { margin: 0 0 2px; font-size: 14px; padding-right: 14px; }
.place-popup .addr { margin: 0 0 8px; font-size: 12px; color: #52606d; }
.place-links { display: flex; gap: 6px; }
.place-links a { flex: 1; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; text-decoration: none; white-space: nowrap; }
.place-links a:hover { color: var(--accent); border-color: var(--accent); }

/* the people in your room: a row of emoji on the neighborhood. It is a
   MapLibre marker: absolute and only as wide as its emoji, otherwise it
   stretches into a bar across the map (seen 2026-10-22). */
.avatars { position: absolute; top: 0; left: 0; width: max-content; cursor: default; display: flex; gap: 2px; padding: 3px 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; font-size: 18px; line-height: 1; white-space: nowrap; }

@container page (max-width: 640px) {
  .topleft { width: calc(100% - 24px - var(--control) - 12px); }
}

:is(.catalog-panel,.catalog-content) .catalog-soon { display: block; padding: 9px 4px; color: var(--muted); }
.catalog-panel .catalog-media-links { border-top: 1px solid var(--border); padding: 4px 0 0; }
.apps-control:disabled{opacity:.38;cursor:default}
:is(.catalog-panel,.catalog-content) .catalog-locked{color:var(--muted,#747f7c);opacity:.55;cursor:default;text-decoration:none}
.catalog-membership{font-size:12px;line-height:1.5}
