OmniVoice-Studio / frontend /src /components /CaptureWidget.css
LΓͺ Phi Nam
Deploy to HF Space
94004a2
Raw
History Blame Contribute Delete
5.76 kB
/* ── Capture Pill ────────────────────────────────────────────────────────
Floating dictation indicator.
Slim horizontal pill: dot | label | timer | dismiss
──────────────────────────────────────────────────────────────────────── */
.capture-pill {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 16px;
min-width: 180px;
max-width: 280px;
height: 48px;
background: rgba(18, 18, 22, 0.88);
backdrop-filter: blur(24px) saturate(180%);
-webkit-backdrop-filter: blur(24px) saturate(180%);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 100px;
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.4),
0 2px 8px rgba(0, 0, 0, 0.2),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
font-family: "Inter Variable", "Inter", -apple-system, sans-serif;
font-size: 13px;
color: rgba(255, 255, 255, 0.9);
animation: pill-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
user-select: none;
cursor: default;
overflow: hidden;
white-space: nowrap;
}
/* ── State-specific borders ─────────────────────────────────────────── */
.capture-pill--recording {
border-color: rgba(239, 68, 68, 0.3);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.4),
0 0 20px rgba(239, 68, 68, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.capture-pill--transcribing {
border-color: rgba(99, 102, 241, 0.3);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.4),
0 0 20px rgba(99, 102, 241, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.capture-pill--done {
border-color: rgba(34, 197, 94, 0.3);
}
.capture-pill--error {
border-color: rgba(239, 68, 68, 0.3);
}
/* ── Animations ─────────────────────────────────────────────────────── */
@keyframes pill-slide-in {
from {
opacity: 0;
transform: translateY(8px) scale(0.92);
filter: blur(4px);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
filter: blur(0);
}
}
/* ── Status dot ─────────────────────────────────────────────────────── */
.capture-pill__dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
background: rgba(255, 255, 255, 0.3);
transition: background 0.2s ease;
}
.capture-pill--recording .capture-pill__dot {
background: #ef4444;
animation: dot-pulse 1.2s ease-in-out infinite;
}
.capture-pill--transcribing .capture-pill__dot {
background: #6366f1;
animation: dot-pulse 1.5s ease-in-out infinite;
}
.capture-pill--done .capture-pill__dot {
background: #22c55e;
animation: none;
}
.capture-pill--error .capture-pill__dot {
background: #ef4444;
animation: none;
}
@keyframes dot-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(0.6); }
}
/* ── Content ────────────────────────────────────────────────────────── */
.capture-pill__content {
flex: 1;
min-width: 0;
overflow: hidden;
}
.capture-pill__label {
font-weight: 500;
font-size: 12.5px;
letter-spacing: 0.01em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
}
/* ── Timer ──────────────────────────────────────────────────────────── */
.capture-pill__timer {
font-family: 'IBM Plex Mono', monospace;
font-size: 11px;
font-weight: 500;
color: rgba(255, 255, 255, 0.5);
letter-spacing: 0.03em;
flex-shrink: 0;
}
/* ── Spinner ────────────────────────────────────────────────────────── */
.capture-pill__spinner {
flex-shrink: 0;
color: rgba(255, 255, 255, 0.4);
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ── Dismiss button ─────────────────────────────────────────────────── */
.capture-pill__dismiss {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 50%;
border: none;
background: rgba(255, 255, 255, 0.06);
color: rgba(255, 255, 255, 0.4);
cursor: pointer;
flex-shrink: 0;
transition: background 0.15s ease, color 0.15s ease;
padding: 0;
}
.capture-pill__dismiss:hover {
background: rgba(255, 255, 255, 0.12);
color: rgba(255, 255, 255, 0.8);
}
/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
.capture-pill { animation: none; opacity: 1; }
.capture-pill__dot { animation: none !important; }
.capture-pill__spinner { animation: none; }
}
/* ── Widget-mode body (standalone Tauri window) ─────────────────────── */
body:has(.capture-pill) {
background: transparent !important;
margin: 0;
padding: 8px;
overflow: hidden;
}