/* SPEC-085 Phase 1 (D9): hide surfaces until Phase 2 or G9.
   SPEC-088: the ask bar and the Ask Looper sheet are live (typed questions, answered in the
   browser). Voice (mic, "Listening…" sheet) and "Ask Looper about this" stay hidden. */
.fab-add,
.mic,
.listen,
.ask-this,
button[aria-label="Add a pin"],
button[aria-label="Speak to Looper"] {
  display: none !important;
}

/* SPEC-088: answer area inside the Ask Looper sheet. */
.phone .ll-ask-answer {
  display: grid;
  gap: 10px;
}

.phone .ll-ask-answer .ll-ask-msg {
  margin: 0;
}

.phone .ll-ask-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.phone .ll-ask-row {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line, rgba(15, 23, 42, 0.14));
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phone .ll-ask-row b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.phone .ll-ask-row span {
  font-size: 13px;
  opacity: 0.72;
  overflow-wrap: anywhere;
}

.phone .ll-ask-row:focus-visible {
  outline: 2px solid var(--ring, var(--brand, #2563eb));
  outline-offset: 2px;
}
/* P02: no news alert chip styling from sample levels — hide alert chip if injected */
.alert-chip {
  display: none !important;
}

/* Empty / status hint: template used nowrap — wrap on narrow phones (AC-085 empty state). */
.phone .hint[role="status"] {
  white-space: normal !important;
  max-width: min(360px, calc(100% - 32px)) !important;
  width: max-content;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.35;
  padding: 10px 14px;
  hyphens: auto;
}

@media (max-width: 414px) {
  .phone .hint[role="status"] {
    max-width: calc(100% - 24px) !important;
    font-size: 12px;
  }
}

/* SPEC-087: real map under the bundle. The bridge inserts .ll-v2-map right after the drawn
   svg.map and adds html.ll-v2-real-map once the map style has loaded; until then (or if the
   map cannot start) the drawing stays. Later siblings (pins, top bar, rail, ask bar, sheets)
   paint above the map; empty areas reach the map so it pans and zooms. */
.phone > .ll-v2-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

html:not(.ll-v2-real-map) .phone > .ll-v2-map {
  visibility: hidden;
}

html.ll-v2-real-map .phone > svg.map {
  display: none;
}

/* Keep the map's attribution clear of the ask bar and readable on the light style. */
html.ll-v2-real-map .phone .mapboxgl-ctrl-bottom-right,
html.ll-v2-real-map .phone .maplibregl-ctrl-bottom-right,
html.ll-v2-real-map .phone .mapboxgl-ctrl-bottom-left,
html.ll-v2-real-map .phone .maplibregl-ctrl-bottom-left {
  bottom: 96px;
}

/* Guest avatar: neutral person glyph (no template "RM" sample). */
.phone button.avatar.avatar--guest {
  font-size: 0;
  line-height: 0;
}

.phone button.avatar.avatar--guest::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The 390x844 phone frame is the prototype's preview, not a layout. The bundle only drops it at
   480px and below, so a tablet (481-899px wide, e.g. iPad portrait or a split window) showed a
   small framed phone in the middle of the screen with the rail cut off. Below the desktop
   layout (.desk, 900px and up) the map fills the screen at every width. */
.stage:not(.desk) {
  padding: 0;
}

.stage:not(.desk) .phone {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

/* The "Phone / Desktop" switch is the prototype's preview control, not a visitor feature.
   The layout follows the screen width (desktop from 900px), so the switch is hidden. */
.view-switch {
  display: none !important;
}
