/* ═══════════════════════════════════════════════════════════════════
   Recording HUD showcase — standalone (not overlaid on settings)
   Desktop-style stage + Spokenly waveform pill
   ═══════════════════════════════════════════════════════════════════ */

.vh-hud-demo {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  margin: 36px auto 8px;
}

.vh-hud-demo__frame {
  overflow: visible;
}

.vh-hud-demo__scene {
  position: relative;
  min-height: 280px;
  padding: 8px 8px 88px;
}

/* Fake Notes / document surface the HUD floats over */
.vh-hud-demo__doc {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 18px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 92%, #fff);
  box-shadow: 0 1px 2px rgba(38, 37, 30, 0.04), 0 10px 28px rgba(38, 37, 30, 0.06);
}

html[data-theme="dark"] .vh-hud-demo__doc {
  background: color-mix(in oklab, var(--bg-elevated) 90%, #2a2820);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 28px rgba(0, 0, 0, 0.25);
}

.vh-hud-demo__doc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.vh-hud-demo__app-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffcc00;
  box-shadow: 0 0 0 2px color-mix(in oklab, #ffcc00 25%, transparent);
}

.vh-hud-demo__doc-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.vh-hud-demo__doc-lines .l {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--ink) 7%, transparent);
}

.vh-hud-demo__doc-lines .w8 { width: 82%; }
.vh-hud-demo__doc-lines .w6 { width: 64%; }
.vh-hud-demo__doc-lines .w9 { width: 91%; }
.vh-hud-demo__doc-lines .w5 { width: 52%; }
.vh-hud-demo__doc-lines .w7 { width: 74%; }

.vh-hud-demo__caret-label {
  margin: 0 0 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--faint);
}

.vh-hud-demo__caret-box {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px dashed color-mix(in oklab, var(--ink) 14%, transparent);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.vh-hud-demo__caret-box.is-empty {
  color: var(--faint);
}

/* HUD sits at the bottom of the scene — like real menu-bar overlay */
.vh-hud-stage {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(380px, calc(100% - 32px));
  pointer-events: none;
}

.vh-hud {
  position: relative;
  width: 100%;
  max-width: 380px;
  pointer-events: auto;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.18));
}

.vh-hud-card {
  width: 100%;
  box-sizing: border-box;
  border-radius: 20px;
  /* Frosted dark glass — matches RecordingHUDChrome floatingGlass (pre-Tahoe) */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(28, 28, 30, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  backdrop-filter: saturate(160%) blur(22px);
  color: rgba(255, 255, 255, 0.92);
  /* Native: white.opacity(0.12) rim — not a red accent ring */
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 8px 28px rgba(0, 0, 0, 0.28),
    0 0 0 0.5px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transform-origin: bottom center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.vh-hud-card[hidden] {
  display: none !important;
}

.vh-hud-card.is-on {
  animation: vh-hud-in 0.22s cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes vh-hud-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Compact recording pill */
.vh-hud-card--rec {
  padding: 10px 14px 10px 12px;
}

.vh-hud-card--rec.has-live {
  padding-bottom: 12px;
  border-radius: 18px;
}

.vh-hud-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 22px;
  min-width: 0;
}

.vh-hud-logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}

.vh-hud-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, var(--font);
  color: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
  white-space: nowrap;
}

.vh-hud-wave {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  width: 100%;
  display: block;
}

.vh-hud-live {
  margin: 8px 0 0;
  min-height: 32px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  display: none;
}

.vh-hud-card--rec.has-live .vh-hud-live,
.vh-hud-live:not(.is-placeholder) {
  display: block;
}

.vh-hud-card--rec.has-live .vh-hud-live.is-placeholder,
.vh-hud-live.is-placeholder {
  display: block;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
}

/* Always show live row once card is recording (placeholder or text) */
.vh-hud-card--rec .vh-hud-live {
  display: block;
}

/* Hover action sheet — solid material chrome (no Liquid Glass bloom) */
.vh-hud-card--actions {
  padding: 0;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    rgba(36, 36, 38, 0.88);
}

.vh-hud-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.vh-hud-action--finish {
  background: rgba(10, 132, 255, 0.12);
  border-radius: 16px 16px 0 0;
}

.vh-hud-action--finish:hover {
  background: rgba(10, 132, 255, 0.18);
}

.vh-hud-action--cancel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, 0.03);
}

.vh-hud-action--cancel:hover {
  background: rgba(255, 255, 255, 0.06);
}

.vh-hud-action-app {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  opacity: 0.55;
  color: rgba(10, 132, 255, 0.95);
}

.vh-hud-action-app img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  opacity: 0.7;
}

.vh-hud-action-app em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.vh-hud-action-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.vh-hud-action-main strong {
  font-size: 14px;
  font-weight: 600;
}

.vh-hud-action--finish .vh-hud-action-main {
  color: #0a84ff;
}

.vh-hud-action--cancel .vh-hud-action-main {
  color: #ff6b6b;
}

.vh-hud-action-brand {
  justify-self: end;
  font-size: 11px;
  font-weight: 500;
  color: rgba(10, 132, 255, 0.35);
}

.vh-hud-action-hint {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}

.vh-hud-action-spacer {
  width: 28px;
  height: 1px;
  justify-self: end;
}

/* Check / X glyphs as CSS shapes (no extra assets) */
.vh-hud-check,
.vh-hud-x {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.vh-hud-check {
  background: #0a84ff;
}

.vh-hud-check::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 3px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.vh-hud-x {
  background: #ff6b6b;
}

.vh-hud-x::before,
.vh-hud-x::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3.5px;
  width: 1.8px;
  height: 9px;
  background: #fff;
  border-radius: 1px;
}

.vh-hud-x::before { transform: rotate(45deg); }
.vh-hud-x::after { transform: rotate(-45deg); }

/* Result card */
.vh-hud-card--result {
  padding: 10px 12px 12px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(32, 32, 34, 0.88);
}

.vh-hud-result-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.vh-hud-result-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 169, 64, 0.95);
  background: rgba(255, 159, 10, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
}

.vh-hud-result-text {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.vh-hud-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #0a84ff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.vh-hud-copy:hover {
  background: #409cff;
}

.vh-hud-copy:active {
  transform: scale(0.98);
}

.vh-hud-copy.is-done {
  background: #30d158;
}

.vh-hud-copy-ico {
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  position: relative;
  opacity: 0.9;
}

.vh-hud-copy-ico::after {
  content: "";
  position: absolute;
  left: 2px;
  top: -3px;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: #0a84ff;
}

.vh-hud-copy.is-done .vh-hud-copy-ico::after {
  background: #30d158;
}

.vh-hud-caption {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

html[data-theme="dark"] .vh-hud-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)),
    rgba(44, 44, 46, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .vh-hud-demo {
    margin-top: 28px;
    width: 100%;
  }
  .vh-hud-demo__scene {
    min-height: 260px;
    padding: 20px 14px 68px;
  }
  .vh-hud-stage {
    width: min(100%, calc(100% - 20px));
  }
  .vh-hud-action {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    text-align: center;
  }
  .vh-hud-action-app,
  .vh-hud-action-brand,
  .vh-hud-action-hint,
  .vh-hud-action-spacer {
    display: none;
  }
}

.swin-toast {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: var(--swin-font-body);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  animation: swin-toast-in 0.2s ease;
}
html[data-theme="dark"] .swin-toast {
  background: rgba(245, 245, 247, 0.95);
  color: #1c1c1e;
}
@keyframes swin-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Settings demo: pure uniform scale on narrow viewports (JS scaleSettingsWindow).
   Do not reflow chrome here — reflow + scale fight each other on phones. */
@media (max-width: 920px) {
  .swin-demo {
    width: min(1100px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  }
}

