/* Suggestion box (Alex 10/24; mockup ~/soda-audit/suggestion-box/mockup.html). The modal
   (js/suggestion-box.js) sits on the app's .modal / .cc-card / .cc-btn look (css/bot-page.css),
   widened to 560px; the dashboard note; the "Missing something?" line; Admin -> Suggestions
   (js/admin_suggestions.js). Tokens only (css/tokens.css + accent.css), both themes. */

.sx-i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── the modal ─────────────────────────────────────────────────────────── */
.modal-overlay.sx-overlay { z-index: 11800; padding: 16px; }
.modal.cc-card.sx-card { max-width: 560px; width: 100%; padding: 24px; text-align: left; background: var(--ds-surface); color: var(--ds-text);
  border: 1px solid var(--ds-border); border-radius: var(--ds-r-lg); box-shadow: var(--ds-shadow-lg); max-height: calc(100vh - 32px); overflow-y: auto; }
.sx-card .modal-title { font-size: 17px; font-weight: 600; margin-bottom: 4px; color: var(--ds-text); }
.sx-sub { font-size: 13px; color: var(--ds-muted); margin-bottom: 18px; line-height: 1.5; }
.sx-loading { font-size: 13px; color: var(--ds-muted); padding: 24px 0; text-align: center; }
.sx-head { display: flex; align-items: center; gap: 8px; margin: -6px -8px 14px; min-height: 44px; }
.sx-icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent;
  color: var(--ds-muted); border-radius: var(--ds-r-md); cursor: pointer; font: inherit; }
.sx-icon-btn:hover { background: var(--ds-hover); color: var(--ds-text); }
.sx-icon-btn:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.sx-back { width: auto; padding: 0 10px 0 6px; gap: 4px; font-size: 13px; font-weight: 500; }
.sx-back[hidden] { display: inline-flex; visibility: hidden; }
.sx-dots { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-border-strong); }
.sx-dot.done { background: var(--ds-muted); }
.sx-dot.on { background: var(--ds-sel-fill); width: 22px; border-radius: 4px; }
.sx-steplbl { font-size: 12px; color: var(--ds-label); margin-left: 4px; font-variant-numeric: tabular-nums; }
.sx-crumb { font-size: 12px; color: var(--ds-label); text-transform: uppercase; letter-spacing: var(--ds-label-tracking); margin-bottom: 6px; }

.sx-tiles { display: grid; gap: 10px; }
.sx-tiles.t3 { grid-template-columns: 1fr; }
.sx-tiles.t5 { grid-template-columns: 1fr 1fr; }
.sx-tiles.t5 .sx-tile:last-child { grid-column: 1 / -1; }
.sx-tile { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; text-align: left; background: transparent; color: var(--ds-text);
  border: 1px solid var(--ds-border-strong); border-radius: var(--ds-r-md); cursor: pointer; font: inherit; font-size: 14px; transition: background-color .15s, border-color .15s; }
.sx-tile:hover { background: var(--ds-hover); border-color: var(--ds-text); }
.sx-tile:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.sx-tile-ic { width: 40px; height: 40px; border-radius: var(--ds-r-md); background: var(--ds-hover); color: var(--ds-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sx-tile-ic .sx-i { width: 20px; height: 20px; stroke-width: 1.8; }
.sx-tiles.t5 .sx-tile { min-height: 56px; }
.sx-tiles.t5 .sx-tile-ic { width: 32px; height: 32px; }
.sx-tiles.t5 .sx-tile-ic .sx-i { width: 18px; height: 18px; }
.sx-tile-t { font-weight: 600; display: block; }
.sx-tile-d { font-size: 13px; color: var(--ds-muted); display: block; margin-top: 1px; }
.sx-tile-go { margin-left: auto; color: var(--ds-label); display: inline-flex; }

.sx-q { font-size: 13px; font-weight: 600; margin: 2px 0 8px; }
.sx-q-hint { font-weight: 400; color: var(--ds-label); }
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-border-strong);
  background: transparent; color: var(--ds-text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; position: relative; }
.sx-chip::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 44px; transform: translateY(-50%); }
.sx-chip:hover { background: var(--ds-hover); }
.sx-chip.on { background: var(--ds-sel-fill); color: var(--ds-on-sel-fill); border-color: var(--ds-sel-fill); }
.sx-chip:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }

.sx-tk-wrap { position: relative; }
.sx-tk-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 5px 8px; background: var(--ds-bg);
  border: 1px solid var(--ds-field-edge); border-radius: var(--ds-r-sm); cursor: text; }
.sx-tk-box:focus-within { border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); }
.sx-tk-chip { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 2px 0 10px; border-radius: var(--ds-r-pill);
  background: var(--ds-sel-fill); color: var(--ds-on-sel-fill); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.sx-tk-chip button { width: 26px; height: 26px; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; position: relative; padding: 0; }
.sx-tk-chip button::before { content: ''; position: absolute; inset: -9px; }
.sx-tk-chip .sx-i { width: 14px; height: 14px; }
.sx-tk-input { flex: 1; min-width: 90px; border: 0; outline: none; background: transparent; color: var(--ds-text); font: inherit; font-size: 14px; height: 32px; padding: 0 4px; }
.sx-tk-input::placeholder { color: var(--ds-label); }
.sx-tk-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--ds-surface); border: 1px solid var(--ds-border-strong);
  border-radius: var(--ds-r-md); box-shadow: var(--ds-shadow-md); z-index: 5; overflow: hidden; }
.sx-tk-opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; font-size: 13px; cursor: pointer; }
.sx-tk-opt b { width: 56px; font-weight: 600; }
.sx-tk-opt span { color: var(--ds-muted); flex: 1; }
.sx-tk-opt.act, .sx-tk-opt:hover { background: var(--ds-hover); }
.sx-hint { font-size: 12px; color: var(--ds-label); margin-top: 6px; }

.sx-note { margin-top: 18px; }
.sx-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.sx-label span { font-weight: 400; color: var(--ds-label); font-size: 12px; }
.sx-ta { width: 100%; box-sizing: border-box; min-height: 84px; resize: vertical; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.5;
  background: var(--ds-bg); color: var(--ds-text); border: 1px solid var(--ds-field-edge); border-radius: var(--ds-r-sm); }
.sx-ta:focus { border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); outline: none; }
.sx-ta::placeholder { color: var(--ds-label); }
.sx-count { text-align: right; font-size: 12px; color: var(--ds-label); margin-top: 4px; font-variant-numeric: tabular-nums; }
.sx-count.near { color: var(--ds-warn); }
.sx-card .cc-actions { align-items: center; }
.sx-noattach { font-size: 12px; color: var(--ds-label); margin-right: auto; }
.sx-card .cc-btn { display: inline-flex; align-items: center; gap: 8px; }

.sx-done { text-align: center; padding: 18px 8px 6px; }
.sx-done-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--ds-sel-bg); color: var(--ds-sel-fg);
  display: flex; align-items: center; justify-content: center; }
.sx-done-ic .sx-i { width: 24px; height: 24px; }
.sx-done h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; color: var(--ds-text); }

@media (max-width: 600px) {
  .modal.cc-card.sx-card { padding: 20px 16px; }
  .sx-tiles.t5 { grid-template-columns: 1fr; }
  .sx-noattach { flex-basis: 100%; }
}

/* ── the dashboard note ("You asked for this — it's live.") ───────────── */
/* It sits where the metric cards sit: lifted 60px over the bottom of the hero, above it in z
   (theme.css .dash-metrics, margin-top -60px, z 3). While a note shows, the cards below drop the
   lift so they never slide under the note. */
.sx-notices:empty { display: none; }
.sx-notices { display: flex; flex-direction: column; gap: 8px; margin: -60px 0 16px; position: relative; z-index: 3; }
.sx-notices:not(:empty) ~ #dash-populated-state .dash-metrics { margin-top: 0; }
.sx-notice { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-left: 3px solid var(--ds-sel-fg); border-radius: var(--ds-r-md); }
.sx-notice-ic { color: var(--ds-sel-fg); display: inline-flex; }
.sx-notice-tx { flex: 1; min-width: 0; font-size: 14px; color: var(--ds-text); }
.sx-notice-tx span { display: block; font-size: 13px; color: var(--ds-muted); overflow-wrap: anywhere; }

/* ── "Missing something?" under a finished backtest (js/results-row.js) ── */
.sx-missing { margin: 8px 0 0; font-size: 13px; color: var(--ds-muted); }
.sx-missing a { color: var(--ds-accent); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.sx-missing a:hover { text-decoration: underline; }

/* ── Admin -> Suggestions (js/admin_suggestions.js) ───────────────────── */
.asx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.asx-bar label { font-size: 12px; color: var(--ds-label); text-transform: uppercase; letter-spacing: var(--ds-label-tracking); }
.asx-input { min-height: 36px; padding: 0 10px; background: var(--ds-bg); color: var(--ds-text); border: 1px solid var(--ds-field-edge);
  border-radius: var(--ds-r-sm); font: inherit; font-size: 13px; }
.asx-search { min-width: 240px; }
.asx-muted { font-size: 12px; color: var(--ds-muted); }
.asx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.asx-table th { text-align: left; padding: 8px 10px; color: var(--ds-muted); font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 1px solid var(--ds-border); white-space: nowrap; }
.asx-table td { padding: 10px; border-bottom: 1px solid var(--ds-border); vertical-align: top; color: var(--ds-text); }
.asx-table tr:last-child td { border-bottom: none; }
.asx-date { white-space: nowrap; font-size: 12px; color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.asx-user { overflow-wrap: anywhere; }
.asx-pick { font-weight: 500; }
.asx-note { color: var(--ds-muted); overflow-wrap: anywhere; max-width: 360px; white-space: pre-wrap; }
.asx-empty { padding: 24px; text-align: center; color: var(--ds-muted); font-size: 13px; }
.asx-msg { font-size: 12px; color: var(--ds-danger); }
.asx-done-note { display: block; font-size: 12px; color: var(--ds-label); margin-top: 4px; }
