/* My views (public/spot-views.js): the saved views' tabs and their Views ▾ button at the end of the market
   strip, never in the header's row. The tabs take what room the figures leave (scrolling within it);
   where the strip has none to spare (under 1200px wide, phones) the button leads the strip instead,
   naming the lit view, and its menu lists them all. */
.sv { display: contents; }
.sv-tabs { display: flex; gap: 4px; margin-left: auto; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sv-tabs::-webkit-scrollbar { display: none; }
.sv-tabs:not(:empty) + .sv-btn { margin-left: -16px; }
.sv-tab, .sv-btn { font: inherit; font-size: 12px; line-height: 1.2; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--muted); cursor: pointer; white-space: nowrap; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; flex: none; }
.sv-tab:hover, .sv-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.sv-tab[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.sv-btn { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; max-width: none; }
.sv-btn svg { flex: none; }
.sv-btn.on svg { color: var(--accent); }
.sv-cur { display: none; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.sv-tab:focus-visible, .sv-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.sv-menu { width: min(340px, calc(100vw - 16px)); max-height: calc(100dvh - 90px); overflow-y: auto; overscroll-behavior: contain; }
.sv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sv-list:empty { display: none; }
.sv-row { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.sv-row:hover, .sv-row:focus-within { background: color-mix(in srgb, var(--line) 60%, transparent); }
.sv-open { flex: 1 1 auto; min-width: 0; text-align: left; font: inherit; font-size: 12.5px; padding: 5px 8px; border: 0; border-radius: 6px;
  background: none; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-open[aria-current] { color: var(--accent); font-weight: 600; }
.sv-open[aria-current]::before { content: '● '; font-size: 9px; vertical-align: 1px; }
.sv-acts { display: inline-flex; flex: none; gap: 1px; }
.sv-act { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; font: inherit; font-size: 13px; border: 0; border-radius: 5px;
  background: none; color: var(--muted); cursor: pointer; }
.sv-act:hover:not(:disabled) { color: var(--text); background: var(--line); }
.sv-act:disabled { opacity: .3; cursor: default; }
.sv-del:hover:not(:disabled) { color: var(--neg, #ef4444); }
.sv-open:focus-visible, .sv-act:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sv-rename { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 12.5px; padding: 4px 7px; border: 1px solid var(--accent); border-radius: 6px;
  background: var(--bg); color: var(--text); outline: none; }
.sv-empty { margin: 0; color: var(--muted); line-height: 1.45; }
.sv-empty[hidden] { display: none; }
.sv-save { display: flex; gap: 6px; margin-top: 4px; }
.sv-name, .sv-link input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--text); }
.sv-name:focus, .sv-link input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.sv-name:disabled { opacity: .75; }
.sv-save .btn:disabled { opacity: .45; cursor: default; }
.sv-more { display: flex; }
.sv-more .btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 0; }
.sv-link { display: flex; }
.sv-link[hidden] { display: none; }
.sv-status { margin: 0; min-height: 1.4em; color: var(--text); }
.sv-status:empty { display: none; }
.sv-undo { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; }
.sv-note { margin: 0; color: var(--muted); font-size: 11px; }

/* A view shared with this visitor (also the Reports page's: the same look and words): small, at the
   bottom, over nothing that matters, gone with Dismiss or Escape */
.view-banner { position: fixed; z-index: 70; left: 50%; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 12px; width: max-content; max-width: calc(100vw - 24px);
  padding: 8px 10px 8px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px;
  background: var(--panel-solid, var(--panel)); color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-size: 12.5px; }
.view-banner b { font-weight: 600; overflow-wrap: anywhere; }
.view-banner-acts { display: inline-flex; gap: 6px; }
.view-banner .btn { padding: 3px 10px; font-size: 12px; color: var(--text); }
.view-banner-add { border-color: var(--accent) !important; background: var(--accent) !important; color: var(--on-accent, #fff) !important; }

@media (max-width: 1199px) {
  .sv-tabs { display: none; }
  .sv-btn, .sv-tabs:not(:empty) + .sv-btn { order: -1; margin: 0 -8px 0 0; }
  .sv-btn.on .sv-lbl { display: none; }
  .sv-btn.on .sv-cur { display: inline-block; }
}
@media (max-width: 640px) {
  .view-banner { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}
/* (touch: finger-sized row buttons) */
@media (pointer: coarse) {
  .sv-act { width: 34px; height: 34px; }
  .sv-open { min-height: 34px; }
}
