/* =========================================================================
   Page 4: Interactive Desktop Demo Styles (Windows 11 + Edge + Twitter + Flow)
   Scroll-Driven Interactive Zoom Experience (Parallels Hero Showcase Zoom)
   ========================================================================= */

.section--desktop-demo.demo-track {
  position: relative;
  height: 220vh;
  margin: 0;
  padding: 0 !important;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.demo__sticky {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 20;
  box-sizing: border-box;
}

.demo__ambient-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(860px 480px at 50% 10%, rgba(239, 164, 100, 0.18), transparent 70%),
    radial-gradient(620px 380px at 50% 5%, rgba(201, 106, 42, 0.16), transparent 75%);
}

.demo__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  z-index: 25;
  text-align: center;
  padding-top: calc(var(--nav-h, 64px) + 8px);
  padding-inline: 24px;
  margin-bottom: 0;
  will-change: opacity, transform;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  flex-shrink: 0;
  box-sizing: border-box;
}

.demo__header .s-head {
  max-width: 960px;
  margin-inline: auto;
  text-align: center;
}

.demo__header .eyebrow {
  margin-bottom: 4px;
  font-size: 11px;
}
.demo__header .s-title {
  font-size: clamp(20px, 2.4vw, 30px);
  margin-bottom: 4px;
  line-height: 1.15;
}
.demo__header .s-sub {
  font-size: 13px;
  line-height: 1.4;
  max-width: 56ch;
  margin: 0 auto 8px;
}

/* Quick Action Bar */
.demo-quick-bar {
  position: absolute;
  top: calc(var(--nav-h, 64px) + 145px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
  will-change: top, transform, opacity;
  transition: transform 0.25s ease;
}

.demo-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.demo-chip-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #efa464;
}

.demo-chip-btn.is-active {
  background: linear-gradient(135deg, #c96a2a, #b85418);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(184, 84, 24, 0.42);
}

.demo-chip-btn--reset {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 7px 14px;
}
.demo-chip-btn--reset:hover {
  background: var(--well);
  color: var(--ink);
}
.demo-chip-btn--reset.is-resetting {
  transform: scale(0.92);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--tint);
  transition: all 0.15s ease;
}
.demo-chip-btn--reset.is-resetting svg,
.demo-chip-btn--reset.is-resetting span {
  display: inline-block;
  transform: rotate(-360deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 640px) {
  .demo__header {
    padding-top: calc(var(--nav-h, 56px) + 2px);
    padding-inline: 14px;
  }
  .demo__header .s-title {
    font-size: 20px;
    margin-bottom: 2px;
  }
  .demo__header .s-sub {
    font-size: 11.5px;
    line-height: 1.35;
    margin-bottom: 4px;
  }
  .demo-quick-bar {
    top: 175px;
    gap: 6px;
    max-width: 100vw;
    padding-inline: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
  }
  .demo-quick-bar::-webkit-scrollbar {
    display: none;
  }
  .demo-chip-btn {
    padding: 5px 11px;
    font-size: 11px;
    gap: 5px;
  }
}

/* Desktop Showcase Stage */
.demo-showcase-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 10;
  overflow: visible;
  pointer-events: auto;
}

/* Computer Monitor Desktop Frame (Fixed 1200x675 16:9 native canvas, scaled by GPU transform) */
.interactive-desktop-frame {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1200px;
  height: 675px;
  margin-left: -600px;
  flex-shrink: 0 !important;
  transform: translate3d(0, var(--df-y, 250px), 0) scale(var(--df-scale, 0.60));
  transform-origin: center top;
  border-radius: 16px;
  padding: 7px 7px 10px 7px;
  background: linear-gradient(180deg, #2b2a27 0%, #151412 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08) inset, 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 45px rgba(224, 112, 32, 0.16);
  will-change: transform;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  z-index: 20;
  transition: border-color .28s ease, box-shadow .28s ease;
}

.desktop-screen-camera {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 12;
  pointer-events: none;
}

.desktop-screen {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1117;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* Wallpaper: Mica Bloom */
.desktop-wallpaper {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 60%, rgba(201, 106, 42, 0.22), transparent 50%),
              radial-gradient(circle at 20% 20%, rgba(29, 155, 240, 0.18), transparent 45%),
              linear-gradient(135deg, #0b0f19, #05070c);
  z-index: 1;
}

/* Edge Browser Window */
.edge-browser-window {
  position: relative;
  z-index: 5;
  width: calc(100% - 24px);
  height: calc(100% - 50px);
  margin: 4px auto 0;
  border-radius: 8px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Edge Titlebar */
.edge-titlebar {
  height: 38px;
  background: #18191c;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.edge-tabs {
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.edge-tab {
  height: 32px;
  background: #000000;
  color: #fff;
  border-radius: 8px 8px 0 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
  max-width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
}

.edge-tab-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edge-tab-close {
  opacity: 0.6;
  cursor: pointer;
}
.edge-tab-close:hover { opacity: 1; }

.edge-new-tab {
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  padding: 4px 8px;
  cursor: pointer;
}

.edge-win-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 6px;
  height: 100%;
  color: #aaa;
  font-size: 13px;
}
.win-btn { cursor: pointer; }
.win-btn--close:hover { color: #f87171; }

/* Edge Toolbar */
.edge-toolbar {
  height: 40px;
  background: #111215;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.edge-nav-buttons {
  display: flex;
  gap: 6px;
}
.t-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 14px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
}
.t-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.edge-address-bar {
  flex: 1;
  height: 28px;
  background: #1c1d22;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 12px;
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.addr-url {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e5e5e5;
}
.edge-sim-badge {
  font-size: 10px;
  font-weight: 700;
  color: #efa464;
  background: rgba(239, 164, 100, 0.12);
  border: 1px solid rgba(239, 164, 100, 0.28);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.edge-ext-icons {
  display: flex;
  gap: 10px;
  color: #888;
  font-size: 13px;
}

/* Twitter Layout */
.twitter-container {
  flex: 1;
  display: flex;
  background: #000000;
  color: #e7e9ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  position: relative;
}

/* Left Nav */
.x-nav-col {
  width: 210px;
  padding: 10px 12px;
  border-right: 1px solid #2f3336;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.x-logo {
  padding: 4px 10px;
  color: #fff;
}

.x-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.x-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: #e7e9ea;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.x-menu-link:hover, .x-menu-link.active {
  background: rgba(239, 243, 244, 0.1);
  font-weight: 700;
}
.x-ico { font-size: 17px; }

.x-post-btn {
  margin-top: 6px;
  background: #1d9bf0;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px;
  border-radius: 999px;
  cursor: pointer;
  width: 100%;
}

.x-user-mini {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 999px;
}
.x-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.x-avatar--lg { width: 42px; height: 42px; font-size: 15px; }
.x-avatar--sm { width: 26px; height: 26px; font-size: 11px; }

.x-user-details { line-height: 1.2; font-size: 12.5px; overflow: hidden; }
.x-name { font-weight: 700; display: flex; align-items: center; gap: 4px; color: #fff; white-space: nowrap; }
.x-badge { color: #1d9bf0; font-size: 11px; }
.x-handle { color: #71767b; font-size: 11.5px; }

/* Center Article Feed (Standard scrollbar, freely scrollable) */
.x-article-col {
  flex: 1;
  max-width: 630px;
  border-right: 1px solid #2f3336;
  display: flex;
  flex-direction: column;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding-bottom: 28px;
  user-select: text !important;
  -webkit-user-select: text !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.x-article-col::-webkit-scrollbar {
  width: 6px;
}
.x-article-col::-webkit-scrollbar-track {
  background: transparent;
}
.x-article-col::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}
.x-article-col::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.x-article-header {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid #2f3336;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 16px;
  font-weight: 700;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 10;
  flex-shrink: 0;
}
.x-back-btn { cursor: pointer; }
.x-expand-ico { margin-left: auto; color: #71767b; font-size: 14px; }

.x-article-body {
  padding: 14px 18px;
  overflow: visible !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

.x-post-text,
.article-p,
.x-post-headline {
  user-select: text !important;
  -webkit-user-select: text !important;
}

.x-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.x-author-meta { flex: 1; }
.x-author-name {
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}
.x-verified-badge { flex-shrink: 0; }
.x-badge-label {
  font-size: 10.5px;
  background: #2f3336;
  color: #71767b;
  padding: 1px 5px;
  border-radius: 4px;
}
.x-author-sub { color: #71767b; font-size: 12px; }

.x-author-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.x-btn-boost {
  background: transparent;
  color: #1d9bf0;
  border: 1px solid rgba(29, 155, 240, 0.4);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.x-btn-boost:hover { background: rgba(29, 155, 240, 0.1); }
.x-more-btn { color: #71767b; cursor: pointer; font-size: 16px; }

.x-post-headline {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px 0;
  color: #fff;
  letter-spacing: -0.01em;
}

.x-post-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: text;
}
.article-p {
  margin: 0;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.25s ease;
  cursor: text;
}
.article-p::selection {
  background: rgba(239, 164, 100, 0.4);
  color: #fff;
}

.article-p.is-selected-video {
  background: rgba(29, 155, 240, 0.28);
  border-left: 3px solid #1d9bf0;
  padding-left: 8px;
  color: #fff;
}
.article-p.is-selected-audio {
  background: rgba(239, 164, 100, 0.28);
  border-left: 3px solid #efa464;
  padding-left: 8px;
  color: #fff;
}

.x-post-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #2f3336;
  font-size: 12px;
  color: #71767b;
}

.x-post-engagements {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 6px 0;
  border-top: 1px solid #2f3336;
  border-bottom: 1px solid #2f3336;
  color: #71767b;
  font-size: 12px;
}
.eng-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Reply Box */
.x-reply-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 6px 10px;
  background: #16181c;
  border-radius: 12px;
  border: 1px solid #2f3336;
}
.x-reply-input-wrap {
  flex: 1;
  font-size: 12.5px;
  color: #71767b;
}
.x-reply-placeholder.is-streaming {
  color: #fff;
  font-weight: 500;
}
.x-reply-submit {
  background: #1d9bf0;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
}

/* Right Sidebar */
.x-sidebar-col {
  width: 250px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.x-search-box {
  height: 34px;
  background: #202327;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.x-search-ico { color: #71767b; font-size: 12px; }
.x-search-box input {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  outline: none;
  width: 100%;
}

.x-side-card {
  background: #16181c;
  border-radius: 12px;
  padding: 12px;
}
.x-side-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}
.x-person-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.x-person-info { flex: 1; line-height: 1.2; font-size: 12px; overflow: hidden; }
.x-person-name { font-weight: 700; color: #fff; white-space: nowrap; }
.x-person-handle { color: #71767b; font-size: 11px; }
.x-follow-btn {
  background: #fff;
  color: #000;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.x-trend-item { margin-bottom: 8px; }
.x-trend-sub { color: #71767b; font-size: 10.5px; }
.x-trend-topic { font-size: 13px; font-weight: 700; color: #fff; margin: 1px 0; }
.x-trend-stats { color: #71767b; font-size: 10.5px; }

/* ==================== ON-SCREEN NATIVE FLOW APP WIDGETS ==================== */

/* Surface A: Audio Flow Floating Trigger & Popups (audio_flow_widget.py) */
.audio-flow-anchor {
  position: absolute;
  z-index: 120;
  pointer-events: auto;
  transition: transform 0.15s ease-out;
}

/* 26px Circular Floating Trigger Button (STAGE_MINIMAL) */
.audio-trigger-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6A00, #E85D04);
  border: 1px solid #FFD0B0;
  box-shadow: 0 4px 12px rgba(232, 93, 4, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #fff;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  animation: hudPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-trigger-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(232, 93, 4, 0.6);
}

.audio-trigger-icon {
  font-size: 13px;
  line-height: 1;
  display: block;
}

/* Floating Glass Cards expanding from trigger */
.audio-popup-card {
  position: absolute;
  top: -4px;
  left: 32px;
  background: #FFFFFF;
  border: 1px solid #FFD0B0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(255, 106, 0, 0.12);
  color: #241708;
  padding: 5px 8px;
  white-space: nowrap;
  animation: hudPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 125;
}

@keyframes hudPopIn {
  0% { opacity: 0; transform: scale(0.9) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Stage 1: Mode Select Row */
.audio-mode-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.audio-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.audio-mode-chip:hover {
  background: #FFF3EA;
  color: #E85D04;
}

.audio-mode-chip.active {
  background: #FFF3EA;
  color: #E85D04;
  border-color: #FFD0B0;
  box-shadow: 0 1px 3px rgba(232, 93, 4, 0.12);
}

.audio-chip-icon {
  font-size: 12px;
}

.audio-chip-divider {
  width: 1px;
  height: 14px;
  background: #FFD0B0;
  margin: 0 2px;
}

.audio-icon-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: #8A8A93;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}

.audio-icon-btn:hover {
  color: #E85D04;
}

.audio-grip-dots {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 8px;
  color: #FF9E66;
  line-height: 0.7;
  padding: 0 2px;
  user-select: none;
}

/* Stage 2: Short Text Warning Card */
.audio-warning-card {
  padding: 8px 12px;
  min-width: 240px;
}

.audio-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.audio-warning-bulb {
  font-size: 14px;
  line-height: 1.2;
}

.audio-warning-msg {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.audio-warn-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #241708;
}

.audio-warn-sub {
  font-size: 10px;
  color: #8A8A93;
}

.audio-warning-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.audio-warn-btn {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.audio-warn-btn--read {
  background: #FFF3EA;
  color: #E85D04;
  border: 1px solid #FFD0B0;
}

.audio-warn-btn--read:hover {
  background: #FFE3D0;
}

.audio-warn-btn--anyway {
  background: #E85D04;
  color: #FFFFFF;
  border: none;
}

.audio-warn-btn--anyway:hover {
  background: #C94A00;
}

/* Stage 3: Depth Select Card */
.audio-depth-card {
  padding: 10px 12px;
  min-width: 270px;
}

.audio-depth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.audio-depth-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #241708;
}

.audio-depth-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #8A8A93;
  cursor: pointer;
  line-height: 1;
}

.audio-depth-close:hover {
  color: #241708;
}

.audio-depth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.audio-depth-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  cursor: pointer;
  color: #4B5563;
  transition: all 0.15s;
}

.audio-depth-btn:hover {
  border-color: #FFD0B0;
  background: #FFF8F3;
}

.audio-depth-btn.active {
  background: #FFF3EA;
  border-color: #FFD0B0;
  color: #E85D04;
  font-weight: 700;
}

.depth-name {
  font-size: 11px;
  font-weight: 700;
}

.depth-time {
  font-size: 9.5px;
  color: #8A8A93;
}

.audio-depth-btn.active .depth-time {
  color: #E85D04;
}

.flow-btn-generate {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF6A00, #E85D04);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.flow-btn-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 93, 4, 0.5);
}

/* 3. Floating Bottom Pill HUD defined in Section 3 below */


/* 4. Real Floating Video Flow Window */
.flow-window--video {
  position: absolute;
  z-index: 105;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  background: #141518;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(29, 155, 240, 0.25);
  overflow: hidden;
  animation: hudPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: width 0.26s ease, height 0.26s ease, top 0.26s ease, left 0.26s ease, right 0.26s ease, bottom 0.26s ease, transform 0.26s ease, border-radius 0.26s ease;
}

/* Maximized mode inside Desktop Screen */
.flow-window--video.is-maximized {
  top: 10px !important;
  left: 10px !important;
  right: 10px !important;
  bottom: 46px !important; /* directly above taskbar */
  width: auto !important;
  height: auto !important;
  transform: none !important;
  border-radius: 8px !important;
  z-index: 110 !important;
  display: flex !important;
  flex-direction: column !important;
  animation: none !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(29, 155, 240, 0.3) !important;
}
.flow-window--video.is-maximized .flow-window__player {
  flex: 1 !important;
  height: 100% !important;
  aspect-ratio: auto !important;
}

/* Fullscreen mode across screen frame */
.flow-window--video.is-fullscreen {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  border-radius: 0 !important;
  border: none !important;
  z-index: 125 !important;
  display: flex !important;
  flex-direction: column !important;
  animation: none !important;
}
.flow-window--video.is-fullscreen .flow-window__player {
  flex: 1 !important;
  height: 100% !important;
  aspect-ratio: auto !important;
}

/* Picture-in-Picture / Corner Background Player mode */
.flow-window--video.is-pip {
  top: auto !important;
  left: auto !important;
  right: 18px !important;
  bottom: 48px !important; /* right above the taskbar */
  width: 290px !important;
  transform: none !important;
  border-radius: 8px !important;
  z-index: 108 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(29, 155, 240, 0.35) !important;
  animation: none !important;
}
.flow-window--video.is-pip .flow-window__subbar {
  padding: 3px 8px !important;
}
.flow-window--video.is-pip .topic-tag {
  max-width: 120px !important;
  font-size: 10px !important;
}
.flow-window--video.is-pip .btn-fullscreen-toggle {
  font-size: 9.5px !important;
  padding: 2px 6px !important;
}
.flow-window--video.is-pip .flow-window__footer {
  padding: 4px 8px !important;
}
.flow-window--video.is-pip .btn-download-mp4 {
  display: none !important;
}

.flow-window.is-dragging {
  transition: none !important;
  user-select: none !important;
}

.flow-window__titlebar {
  height: 32px;
  background: #1e2024;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
}
.flow-window.is-dragging .flow-window__titlebar,
.flow-window__titlebar:active {
  cursor: grabbing;
}
.flow-window__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.flow-window__controls {
  display: flex;
  gap: 4px;
  color: #888;
  font-size: 13px;
}
.f-ctrl {
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: #a0a5ad;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.f-ctrl:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.f-ctrl--close:hover {
  background: #e81123 !important;
  color: #ffffff !important;
}

.flow-window__subbar {
  padding: 6px 10px;
  background: #18191c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.badge-tag {
  background: #1d9bf0;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 9.5px;
}
.topic-tag {
  color: #aaa;
  margin-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.btn-fullscreen-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ddd;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}
.btn-fullscreen-toggle:hover {
  background: rgba(29, 155, 240, 0.22);
  border-color: #1d9bf0;
  color: #fff;
}

.flow-window__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.flow-demo-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flow-video-custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  z-index: 5;
}
.f-play-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.f-scrubber {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.f-scrubber-track {
  height: 100%;
  background: #1d9bf0;
  border-radius: 999px;
}
.f-time {
  font-size: 10.5px;
  font-family: var(--mono);
  color: #ccc;
}

.flow-window__footer {
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #18191c;
  font-size: 11px;
}
.status-left {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #4ade80;
  font-weight: 600;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}
.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pct-badge {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
}
.btn-download-mp4 {
  color: #1d9bf0;
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
}

/* 5. Real Floating Audio Flow Window */
.flow-window--audio {
  position: absolute;
  z-index: 105;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  background: #151619;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(239, 164, 100, 0.25);
  overflow: hidden;
  animation: hudPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-hud-icon { font-size: 13px; }
.audio-player-body {
  padding: 14px 16px;
}
.audio-player-meta {
  margin-bottom: 12px;
  text-align: center;
}
.audio-track-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-track-sub {
  font-size: 11px;
  color: #efa464;
  margin-bottom: 8px;
}

.audio-soundwaves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 20px;
  margin: 8px 0;
}
.wave-bar {
  width: 3px;
  height: 6px;
  background: #efa464;
  border-radius: 999px;
  transition: height 0.2s;
}
.audio-soundwaves.is-playing .wave-bar:nth-child(2n) { animation: waveUp 0.6s infinite ease-in-out alternate; }
.audio-soundwaves.is-playing .wave-bar:nth-child(2n+1) { animation: waveUp 0.8s infinite ease-in-out alternate-reverse; }

@keyframes waveUp {
  0% { height: 4px; }
  100% { height: 18px; }
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.audio-step-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccc;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.audio-main-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #efa464, #e06222);
  color: #fff;
  border: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201, 106, 42, 0.45);
}

.audio-seeker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-family: var(--mono);
  color: #888;
  margin-bottom: 10px;
}
.audio-seeker-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.audio-seeker-fill {
  height: 100%;
  background: #efa464;
  border-radius: 999px;
}

.audio-speed-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.5px;
  color: #888;
}
.speed-chips {
  display: flex;
  gap: 4px;
}
.speed-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #bbb;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.speed-chip.active {
  background: rgba(239, 164, 100, 0.25);
  border-color: #efa464;
  color: #fff;
}

/* Windows 11 Taskbar (Matches real Windows 11 layout) */
.desktop-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(18, 19, 22, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 40;
}

.taskbar-left {
  display: flex;
  align-items: center;
}
.taskbar-weather {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  color: #ccc;
  cursor: pointer;
}
.taskbar-weather:hover { background: rgba(255, 255, 255, 0.06); }

.taskbar-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-icon {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.18s;
}
.tb-icon:hover { background: rgba(255, 255, 255, 0.08); }
.tb-app--active { background: rgba(255, 255, 255, 0.06); }
.active-dot {
  position: absolute;
  bottom: 2px;
  width: 6px;
  height: 2.5px;
  background: #888;
  border-radius: 999px;
}
.active-dot--flow {
  background: #efa464;
  width: 14px;
  box-shadow: 0 0 6px #efa464;
}

.tb-search-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #888;
  font-size: 11.5px;
  cursor: pointer;
  margin: 0 4px;
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.systray-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
}
.systray-group:hover { background: rgba(255, 255, 255, 0.06); }
.tray-lang {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.1;
  color: #aaa;
  text-align: right;
}
.tray-clock {
  font-size: 10.5px;
  line-height: 1.2;
  color: #ccc;
  text-align: right;
  font-family: var(--mono);
}

/* ==================== SURFACE C: VIDEO FLOW COMPOSER MODAL (video_flow_widget.py) ==================== */
.flow-window--create-video {
  position: absolute;
  z-index: 105;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 70px);
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #FFD0B0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 106, 0, 0.12);
  color: #241708;
  overflow-y: auto;
  animation: hudPopIn 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-window--create-video .flow-window__titlebar {
  background: #FFF8F3;
  border-bottom: 1px solid #FFD0B0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.flow-window--create-video .flow-window__title {
  color: #241708;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flow-window--create-video .flow-window__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8A8A93;
}

.video-create-body {
  padding: 14px 18px;
}

.vc-top-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.vc-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #FF6A00;
}

.vc-badge-text {
  font-size: 10px;
  font-weight: 800;
  color: #FF6A00;
  letter-spacing: 0.06em;
}

.vc-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 3px 0;
  letter-spacing: -0.02em;
  color: #241708;
}

.vc-subtitle {
  font-size: 11.5px;
  color: #6B7280;
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.engine-tabs {
  display: flex;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 8px;
}

.engine-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #6B7280;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}

.engine-tab.active {
  background: #FFFFFF;
  color: #FF6A00;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.vc-account-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.vc-acc-dot {
  font-size: 10px;
  color: #047857;
  font-weight: 800;
}

.vc-acc-details {
  font-size: 10.5px;
  color: #047857;
  font-weight: 600;
}

.vc-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.vc-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.vc-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #4B5563;
}

.vc-textarea {
  width: 100%;
  height: 48px;
  background: #F9FAFB;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  color: #241708;
  font-family: inherit;
  font-size: 11.5px;
  padding: 6px 8px;
  line-height: 1.35;
  resize: none;
  box-sizing: border-box;
}

.vc-doc-btn {
  align-self: flex-start;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
}

.vc-doc-btn:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
}

.vc-select, .vc-input {
  width: 100%;
  padding: 5px 8px;
  font-size: 11.5px;
  color: #241708;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
}

.vc-select:focus, .vc-input:focus, .vc-textarea:focus {
  border-color: #FF6A00;
}

.vc-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #F3F4F6;
}

.vc-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vc-status-dots {
  display: flex;
  gap: 2px;
}

.vc-status-dots span {
  width: 8px;
  height: 4px;
  background: #FF6A00;
  border-radius: 2px;
}

.vc-status-text {
  font-size: 10.5px;
  color: #6B7280;
  font-weight: 500;
}

.vc-generate-btn {
  width: auto !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}


/* ==================== SURFACE B: SUNRISE FLOATING OVERLAY BAR (overlay.py) ==================== */
.flow-floating-pill-hud {
  position: absolute;
  bottom: 52px; /* 8px above the 44px taskbar */
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  box-sizing: border-box;
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
}

.flow-floating-pill-hud:active,
.flow-floating-pill-hud.is-dragging {
  cursor: grabbing !important;
}

.flow-floating-pill-hud.is-dragging {
  transition: none !important;
  user-select: none !important;
}

.flow-pill-handle,
.pill-rest-handle {
  cursor: grab;
  user-select: none;
}

.flow-pill-handle:active,
.pill-rest-handle:active {
  cursor: grabbing;
}

/* State 1: Quiet Collapsed Rest Pill */
.flow-floating-pill-hud.is-rest {
  height: 20px !important;
  width: 52px !important;
  background: #17171C !important;
  border: 1px solid #2C2C36 !important;
  border-radius: 999px !important;
  padding: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
  justify-content: center !important;
  cursor: grab !important;
}

.flow-floating-pill-hud.is-rest:active {
  cursor: grabbing !important;
}

.flow-floating-pill-hud.is-rest:hover {
  width: 60px !important;
  border-color: #55555F !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.75) !important;
}

.pill-rest-handle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rest-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #55555F;
}

/* State 2: Expanded Sunrise White Pill */
.flow-floating-pill-hud.is-expanded {
  height: 32px !important;
  background: #FFFFFF !important;
  border: 1px solid #FFD0B0 !important;
  border-radius: 999px !important;
  padding: 0 8px 0 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 14px rgba(255, 106, 0, 0.16) !important;
  color: #241708 !important;
}

.pill-state-expanded {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.flow-pill-btn {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  color: #374151;
  transition: all 0.15s ease;
}

.flow-pill-btn:hover {
  background: #FFF8F3;
  color: #E85D04;
}

.flow-pill-btn--video {
  color: #FF6A00 !important;
  background: #FFF3EA !important;
  border: 1px solid #FFD0B0 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(255, 106, 0, 0.15) !important;
}

.flow-pill-btn--video:hover {
  background: #FFE3D0 !important;
}

.flow-pill-btn--settings {
  color: #8A8A93;
}

.flow-pill-divider {
  width: 1px;
  height: 14px;
  background: #E5E7EB;
  margin: 0 3px;
}

.flow-pill-handle {
  display: flex;
  align-items: center;
  color: #9CA3AF;
  font-size: 11px;
  font-weight: 800;
  padding: 0 3px;
  user-select: none;
  cursor: grab;
}

/* State 3: Progress Rail (Video or Audio Generation) */
.flow-floating-pill-hud.is-progress {
  height: 32px !important;
  min-width: 290px !important;
  background: #FFFFFF !important;
  border: 1px solid #FFD0B0 !important;
  border-radius: 999px !important;
  padding: 0 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), 0 0 18px rgba(255, 106, 0, 0.22) !important;
}

.pill-state-progress {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
}

.pill-prog-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pill-prog-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #FF6A00;
}

.pill-prog-dots {
  display: flex;
  gap: 2px;
}

.pill-prog-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #FF6A00;
  animation: progDotPulse 1.2s infinite ease-in-out alternate;
}

.pill-prog-dots span:nth-child(2) { animation-delay: 0.2s; }
.pill-prog-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes progDotPulse {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.pill-prog-track {
  flex: 1;
  height: 5px;
  background: #FFE3D0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin: 0 4px;
}

.pill-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6A00, #E85D04);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.pill-prog-pct {
  font-size: 10.5px;
  font-weight: 700;
  color: #241708;
  min-width: 30px;
  text-align: right;
  font-family: var(--mono, monospace);
}

.pill-prog-cancel {
  background: none;
  border: none;
  color: #8A8A93;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.pill-prog-cancel:hover { color: #F04438; }

/* State 4: Video Ready Pill */
.flow-floating-pill-hud.is-ready {
  height: 32px !important;
  background: #F0FDF4 !important;
  border: 1px solid #86EFAC !important;
  border-radius: 999px !important;
  padding: 0 8px 0 10px !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.24) !important;
  color: #15803D !important;
  cursor: pointer !important;
}

.pill-state-ready {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-ready-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #16A34A;
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-ready-btn {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  color: #15803D;
  cursor: pointer;
  padding: 0;
}

.pill-ready-dismiss {
  background: none;
  border: none;
  font-size: 12px;
  color: #16A34A;
  cursor: pointer;
  margin-left: 4px;
}

/* State 5: Audio Playback Bar */
.flow-floating-pill-hud.is-audio {
  height: 32px !important;
  background: #FFFFFF !important;
  border: 1px solid #FFD0B0 !important;
  border-radius: 999px !important;
  padding: 0 8px 0 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.pill-state-audio {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pill-audio-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #E85D04;
}

.pill-audio-sounddots {
  display: flex;
  gap: 2px;
  margin-right: 4px;
}

.pill-audio-sounddots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #E85D04;
  animation: progDotPulse 0.9s infinite alternate ease-in-out;
}
.pill-audio-sounddots span:nth-child(2) { animation-delay: 0.2s; }
.pill-audio-sounddots span:nth-child(3) { animation-delay: 0.4s; }

.flow-pill-ctrl-btn {
  background: none;
  border: none;
  color: #374151;
  font-size: 11.5px;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.flow-pill-ctrl-btn:hover {
  background: #FFF3EA;
  color: #E85D04;
}

.pill-close-btn:hover {
  color: #F04438 !important;
}

/* State 6: Voice Recording Waveform Strip */
.flow-floating-pill-hud.is-voice-rec {
  height: 34px !important;
  min-width: 260px !important;
  background: #18191D !important;
  border: 1px solid #3F3F46 !important;
  border-radius: 999px !important;
  padding: 0 8px 0 10px !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 16px rgba(239, 68, 68, 0.3) !important;
  color: #FFFFFF !important;
}

.pill-state-voice-rec {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.voice-rec-cancel {
  background: none;
  border: none;
  color: #F87171;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}

.voice-rec-finish {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #16A34A;
  color: #FFF;
  border: none;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.voice-rec-finish:hover { transform: scale(1.1); }

/* 15-bar animated audio waveform */
.voice-rec-waveforms {
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.voice-rec-waveforms i {
  width: 2.5px;
  height: 4px;
  background: #FF6A00;
  border-radius: 999px;
  display: block;
  animation: voiceWavePulse 1.1s infinite ease-in-out alternate;
}

.voice-rec-waveforms i:nth-child(2) { animation-delay: 0.1s; }
.voice-rec-waveforms i:nth-child(3) { animation-delay: 0.25s; }
.voice-rec-waveforms i:nth-child(4) { animation-delay: 0.4s; }
.voice-rec-waveforms i:nth-child(5) { animation-delay: 0.15s; }
.voice-rec-waveforms i:nth-child(6) { animation-delay: 0.35s; }
.voice-rec-waveforms i:nth-child(7) { animation-delay: 0.5s; }
.voice-rec-waveforms i:nth-child(8) { animation-delay: 0.2s; }
.voice-rec-waveforms i:nth-child(9) { animation-delay: 0.45s; }
.voice-rec-waveforms i:nth-child(10) { animation-delay: 0.3s; }
.voice-rec-waveforms i:nth-child(11) { animation-delay: 0.12s; }
.voice-rec-waveforms i:nth-child(12) { animation-delay: 0.28s; }
.voice-rec-waveforms i:nth-child(13) { animation-delay: 0.42s; }
.voice-rec-waveforms i:nth-child(14) { animation-delay: 0.18s; }
.voice-rec-waveforms i:nth-child(15) { animation-delay: 0.38s; }

@keyframes voiceWavePulse {
  0% { height: 3px; opacity: 0.4; }
  50% { height: 16px; opacity: 1; background: #E85D04; }
  100% { height: 5px; opacity: 0.6; }
}

/* State 7: Voice Transcribing */
.flow-floating-pill-hud.is-voice-transcribing {
  height: 32px !important;
  background: #18191D !important;
  border: 1px solid #3F3F46 !important;
  border-radius: 999px !important;
  padding: 0 12px !important;
  color: #FFFFFF !important;
}

.pill-state-voice-transcribing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-transcribe-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #E5E7EB;
}

.voice-transcribe-dots {
  display: flex;
  gap: 3px;
}

.voice-transcribe-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FF6A00;
  animation: progDotPulse 0.9s infinite alternate ease-in-out;
}
.voice-transcribe-dots span:nth-child(2) { animation-delay: 0.2s; }
.voice-transcribe-dots span:nth-child(3) { animation-delay: 0.4s; }

/* State 8: Voice Done */
.flow-floating-pill-hud.is-voice-done {
  height: 32px !important;
  background: #14291F !important;
  border: 1px solid #22C55E !important;
  border-radius: 999px !important;
  padding: 0 10px 0 12px !important;
  color: #4ADE80 !important;
}

.pill-state-voice-done {
  display: flex;
  align-items: center;
  gap: 6px;
}

.voice-done-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #16A34A;
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-done-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #4ADE80;
}

.voice-done-close {
  background: none;
  border: none;
  color: #4ADE80;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}
