/* ---- Waiting pop-up (js/wait.js): one per data tab, over the tab area only ---- */

.wait-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-primary);
}
.wait-layer.shown { background: rgba(0, 0, 0, 0.45); }
.wait-card {
  visibility: hidden;
  width: min(500px, calc(100% - 32px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  padding: 18px 22px 14px;
}
.wait-layer.shown .wait-card { visibility: visible; }
.wait-card h4 { margin: 0 0 4px; font-size: var(--font-size-lg); }
.wait-say { margin: 0 0 10px; color: var(--text-secondary); }
.wait-time { margin: 0 0 10px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }

.wait-steps { list-style: none; margin: 0 0 10px; padding: 0; }
.wait-steps li { display: flex; gap: 8px; align-items: center; padding: 2px 0; color: var(--text-muted); }
.wait-steps li b { font-weight: inherit; min-width: 14px; }
.wait-steps li.done { color: var(--text-secondary); }
.wait-steps li.done b::before { content: "\2713 "; color: var(--success); }
.wait-steps li.now { color: var(--text-primary); font-weight: 600; }
.wait-steps li.now b::before { content: "\25B8 "; color: var(--accent); }
.wait-steps li.wait-bar-row { padding-left: 22px; }
.wait-steps li.wait-bar-row .wait-bar { flex: 1; margin: 0; }
.wait-t { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 400; color: var(--text-secondary); }

.wait-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.wait-bar-label, .wait-bar-size { font-size: var(--font-size-sm); color: var(--text-secondary); white-space: nowrap; }
.wait-bar-size { font-variant-numeric: tabular-nums; }
.wait-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  overflow: hidden;
}
.wait-fill { display: block; height: 100%; background: var(--accent); }

.wait-foot { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.wait-hint { margin-right: auto; color: var(--text-muted); font-size: var(--font-size-sm); }

.wait-quote-slot {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 10px;
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
}
.wait-quote { display: grid; }
.wait-quote-item { grid-area: 1 / 1; visibility: hidden; }
/* Under .shown: a visible child would show through the card's hidden visibility. */
.wait-layer.shown .wait-quote-item.on { visibility: visible; }
.wait-quote-by { font-style: normal; color: var(--text-muted); font-size: var(--font-size-sm); margin-top: 4px; }

/* ---- Pop-up menus (dropdown in js/ui.js): Appearance, Export report ---- */

.appearance { display: inline-block; }
.popup-menu {
  position: fixed;
  z-index: 50;
  width: 230px;
  padding: 8px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.popup-menu.narrow { width: auto; min-width: 120px; }
.popup-menu h5 {
  margin: 4px 12px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.popup-menu hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 6px 0; }
.popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 12px;
  font: inherit;
  color: var(--text-primary);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.popup-item:hover { background: var(--bg-hover); }
.popup-item.on { background: var(--accent-muted); font-weight: 600; }
.popup-chk { width: 12px; color: var(--accent); }
.appearance-sw {
  display: inline-flex;
  width: 28px;
  height: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.appearance-sw i { flex: 1; }
