/* Subtle, system-feeling tweaks beyond Tailwind */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #a3a3a3; background-clip: content-box; border: 2px solid transparent; }

/* Mic gradient orb — breathing animation + blurred halo for a tech feel.
 * Layering trick: the .mic-orb is the visible sphere, and ::before paints a
 * larger, heavily-blurred copy underneath that gently pulses in scale and
 * opacity to create a soft "aura". */
.mic-orb {
  position: relative;
  isolation: isolate;
  background: radial-gradient(circle at 32% 28%, #ffe3ef 0%, #d8c4fb 38%, #b0c4f8 72%, #9cb8ee 100%);
  box-shadow:
    0 20px 50px rgba(170, 140, 255, 0.28),
    inset 0 -14px 28px rgba(255, 255, 255, 0.55),
    inset 0 14px 28px rgba(140, 110, 230, 0.18);
  animation: orb-breathe 3.8s ease-in-out infinite;
  transition: transform 0.2s ease;
}
.mic-orb::before {
  content: '';
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffd5e9 0%, #c9b5fc 45%, #a4c0f5 80%, transparent 100%);
  filter: blur(28px);
  opacity: 0.55;
  z-index: -1;
  animation: orb-glow 4.4s ease-in-out infinite;
}
.mic-orb::after {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 50%);
  pointer-events: none;
}
.mic-orb.recording { animation: orb-breathe 2s ease-in-out infinite; }
.mic-orb.recording::before { animation: orb-glow 2.4s ease-in-out infinite; opacity: 0.75; }
@keyframes orb-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}
@keyframes orb-glow {
  0%, 100% { transform: scale(1);    opacity: 0.4; filter: blur(22px); }
  50%      { transform: scale(1.18); opacity: 0.7; filter: blur(32px); }
}

/* Folder shape (simple CSS-only) */
.folder {
  position: relative;
  border-radius: 12px 12px 12px 12px;
}
.folder::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 12px;
  width: 38%;
  height: 14px;
  background: inherit;
  border-radius: 8px 8px 0 0;
}

/* App drag region (Electron frameless title bar) */
.drag-region { -webkit-app-region: drag; }
.no-drag { -webkit-app-region: no-drag; }

/* Nav item active state */
.nav-item.active { background: #f4f4f5; color: #0f1115; }
.nav-item { color: #4b5563; }
.nav-item:hover { background: #f4f4f5; }

/* Segment toggle (mic / system audio) */
.seg-btn { color: #6b7280; }
.seg-btn.active { background: #ffffff; color: #0f1115; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* Soft cards */
.card { background: #ffffff; border: 1px solid #ececec; border-radius: 14px; }
.chip { background: #f4f4f5; color: #4b5563; }

/* Hide default focus on buttons */
button:focus { outline: none; }
button:focus-visible { outline: 2px solid #8b7cf6; outline-offset: 2px; border-radius: 8px; }

/* Flowing sound wave animation — three offset/speed sine curves slide left. */
@keyframes wave-flow-a { from { transform: translateX(0); }    to { transform: translateX(-50px); } }
@keyframes wave-flow-b { from { transform: translateX(0); }    to { transform: translateX(-50px); } }
@keyframes wave-flow-c { from { transform: translateX(0); }    to { transform: translateX(-80px); } }
.wave-flow-1 { animation: wave-flow-a 1.4s linear infinite; }
.wave-flow-2 { animation: wave-flow-b 2.1s linear infinite; }
.wave-flow-3 { animation: wave-flow-c 2.8s linear infinite; }

/* LIVE panel typing indicators. */
.live-caret { display: inline-block; margin-left: 2px; color: #0f1115; opacity: 0.55; animation: live-blink 1s steps(1, end) infinite; font-weight: 400; }
.live-dots  { display: inline-block; margin-left: 2px; color: #71717a; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-blink { 50% { opacity: 0; } }
@keyframes live-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Currently-playing transcript segment — recessed/pressed look. */
.seg-card { transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }
.seg-card:hover { background: #fafafa; }
.seg-card.seg-active {
  background: #f4f4f5;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  border-color: #d4d4d8;
}

/* User-selectable dark theme. The default stays light; this only applies when
   the bottom theme toggle stores settings.theme = "dark". */
body[data-theme="dark"] {
  background: #0f1115;
  color: #e5e7eb;
  color-scheme: dark;
}
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-paper {
  background-color: #0f1115 !important;
}
body[data-theme="dark"] .bg-zinc-50 {
  background-color: #181b22 !important;
}
body[data-theme="dark"] .bg-zinc-100 {
  background-color: #232733 !important;
}
body[data-theme="dark"] .bg-zinc-200 {
  background-color: #2a2f3a !important;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .rounded-2xl.bg-white,
body[data-theme="dark"] .rounded-xl.bg-white,
body[data-theme="dark"] .border.bg-white {
  background-color: #151922 !important;
  border-color: #2a2f3a !important;
}
body[data-theme="dark"] .border-line,
body[data-theme="dark"] .border-zinc-100,
body[data-theme="dark"] .border-zinc-200,
body[data-theme="dark"] .border-zinc-300 {
  border-color: #2a2f3a !important;
}
body[data-theme="dark"] .text-ink-900,
body[data-theme="dark"] .text-zinc-950,
body[data-theme="dark"] .text-zinc-900,
body[data-theme="dark"] .text-zinc-800,
body[data-theme="dark"] .text-zinc-700 {
  color: #f4f4f5 !important;
}
body[data-theme="dark"] .text-zinc-600,
body[data-theme="dark"] .text-zinc-500,
body[data-theme="dark"] .text-zinc-400 {
  color: #a1a1aa !important;
}
body[data-theme="dark"] header .text-brand-600 {
  color: #ffffff !important;
}
body[data-theme="dark"] .nav-item {
  color: #c4c7d0;
}
body[data-theme="dark"] .nav-item.active,
body[data-theme="dark"] .chip {
  background: #232733;
  color: #f4f4f5;
}
body[data-theme="dark"] .nav-item:hover,
body[data-theme="dark"] .hover\:bg-zinc-50:hover,
body[data-theme="dark"] .hover\:bg-zinc-100:hover {
  background-color: #20242e !important;
}
body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
  background-color: #11151c !important;
  border-color: #2a2f3a !important;
  color: #f4f4f5 !important;
}
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #71717a !important;
}
body[data-theme="dark"] .seg-btn {
  color: #a1a1aa;
}
body[data-theme="dark"] .seg-btn.active {
  background: #151922;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
body[data-theme="dark"] .seg-card:hover,
body[data-theme="dark"] .seg-card.seg-active {
  background: #20242e;
  border-color: #343946;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}
body[data-theme="dark"] .mic-orb {
  background:
    radial-gradient(circle at 68% 68%, rgba(74, 202, 233, 0.95) 0%, rgba(78, 177, 229, 0.82) 30%, rgba(104, 112, 229, 0.72) 58%, rgba(133, 74, 216, 0.9) 100%),
    linear-gradient(145deg, #8a4fdc 0%, #5d7bed 52%, #45c7e7 100%);
  box-shadow:
    0 0 0 3px rgba(150, 96, 232, 0.22),
    0 0 22px rgba(127, 82, 226, 0.36),
    0 14px 34px rgba(28, 32, 48, 0.72),
    inset 0 -12px 22px rgba(6, 18, 28, 0.28),
    inset 0 12px 24px rgba(255, 255, 255, 0.16);
}
body[data-theme="dark"] .mic-orb::before {
  background:
    radial-gradient(circle at 36% 30%, rgba(151, 87, 230, 0.58) 0%, rgba(78, 193, 231, 0.28) 44%, rgba(15, 17, 21, 0) 78%);
  filter: blur(18px);
  opacity: 0.55;
}
body[data-theme="dark"] .mic-orb::after {
  background: radial-gradient(circle at 32% 24%, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0) 46%);
}
body[data-theme="dark"] .mic-orb.recording::before {
  opacity: 0.68;
}
body[data-theme="dark"] .mic-orb svg {
  opacity: 0.96;
}
body[data-theme="dark"] #recording-finish-overlay {
  background: rgba(15, 17, 21, 0.72) !important;
}
body[data-theme="dark"] #recording-finish-overlay > div {
  background: rgba(21, 25, 34, 0.92) !important;
  border-color: rgba(65, 73, 90, 0.8) !important;
}
body[data-theme="dark"] #recording-finish-overlay img {
  background: #ffffff;
}
body[data-theme="dark"] #finish-compress-bar,
body[data-theme="dark"] #finish-upload-bar {
  background-color: #7dd3fc !important;
}
