/**
* Voice System Styles - Mobile-First Design
* ==========================================
* Touch-optimized components with animated waveforms
*/
/* ============================================================================
Base Voice Components
============================================================================ */
/* Voice Search */
.voice-search-container {
width: 100%;
position: relative;
}
.voice-search-input-wrapper {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem;
background: var(--bg-elevated, #1a1a1a);
border: 1px solid var(--border-subtle, #333);
border-radius: 12px;
transition: all 0.2s ease;
}
.voice-search-input-wrapper:focus-within {
border-color: var(--accent-red, #dc2626);
box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.voice-search-input {
flex: 1;
background: transparent;
border: none;
outline: none;
font-size: 16px; /* Prevents iOS zoom */
color: var(--text-primary, #fff);
padding: 0.5rem;
}
.voice-search-input::placeholder {
color: var(--text-tertiary, #666);
}
.voice-search-mic-button,
.voice-search-submit-button {
min-width: 48px; /* Touch target */
min-height: 48px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: none;
background: var(--bg-overlay, #222);
color: var(--text-secondary, #999);
cursor: pointer;
transition: all 0.2s ease;
position: relative;
-webkit-tap-highlight-color: transparent;
}
.voice-search-mic-button:active,
.voice-search-submit-button:active {
transform: scale(0.95);
}
.voice-search-mic-button.listening {
background: var(--accent-red, #dc2626);
color: white;
animation: pulse 1.5s infinite;
}
.voice-search-submit-button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.voice-search-submit-button:not(:disabled):hover {
background: var(--accent-red, #dc2626);
color: white;
}
.voice-search-error {
margin-top: 0.5rem;
padding: 0.75rem;
background: rgba(220, 38, 38, 0.1);
border: 1px solid var(--accent-red, #dc2626);
border-radius: 8px;
color: var(--accent-red, #dc2626);
font-size: 14px;
}
.voice-search-hint {
margin-top: 0.5rem;
padding: 0.5rem;
text-align: center;
color: var(--text-tertiary, #666);
font-size: 12px;
animation: fadeIn 0.3s ease;
}
/* ============================================================================
Voice Chat
============================================================================ */
.voice-chat-container {
display: flex;
flex-direction: column;
height: 100%;
max-height: 600px;
background: var(--bg-base, #0a0a0a);
border-radius: 16px;
overflow: hidden;
}
.voice-chat-messages {
flex: 1;
overflow-y: auto;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
-webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}
.voice-chat-empty {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
text-align: center;
}
.voice-chat-message {
display: flex;
flex-direction: column;
max-width: 85%;
animation: slideIn 0.3s ease;
}
.voice-chat-message.user {
align-self: flex-end;
}
.voice-chat-message.assistant {
align-self: flex-start;
}
.voice-chat-message-content {
padding: 0.875rem 1rem;
border-radius: 16px;
font-size: 15px;
line-height: 1.5;
word-wrap: break-word;
}
.voice-chat-message.user .voice-chat-message-content {
background: var(--accent-red, #dc2626);
color: white;
border-bottom-right-radius: 4px;
}
.voice-chat-message.assistant .voice-chat-message-content {
background: var(--bg-elevated, #1a1a1a);
color: var(--text-primary, #fff);
border-bottom-left-radius: 4px;
}
.voice-chat-message-time {
font-size: 11px;
color: var(--text-tertiary, #666);
margin-top: 0.25rem;
padding: 0 0.5rem;
}
.voice-chat-input-wrapper {
padding: 1rem;
background: var(--bg-elevated, #1a1a1a);
border-top: 1px solid var(--border-subtle, #333);
}
.voice-chat-input {
width: 100%;
background: var(--bg-overlay, #222);
border: 1px solid var(--border-subtle, #333);
border-radius: 12px;
padding: 0.875rem;
font-size: 15px;
color: var(--text-primary, #fff);
resize: none;
outline: none;
font-family: inherit;
transition: border-color 0.2s ease;
}
.voice-chat-input:focus {
border-color: var(--accent-red, #dc2626);
}
.voice-chat-input::placeholder {
color: var(--text-tertiary, #666);
}
.voice-chat-controls {
display: flex;
gap: 0.5rem;
margin-top: 0.75rem;
justify-content: flex-end;
}
.voice-chat-mic-button,
.voice-chat-send-button {
min-width: 48px;
min-height: 48px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: none;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
-webkit-tap-highlight-color: transparent;
}
.voice-chat-mic-button {
background: var(--bg-overlay, #222);
color: var(--text-secondary, #999);
}
.voice-chat-mic-button.listening {
background: var(--accent-red, #dc2626);
color: white;
animation: pulse 1.5s infinite;
}
.voice-chat-send-button {
background: var(--accent-red, #dc2626);
color: white;
}
.voice-chat-send-button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.voice-chat-send-button:active,
.voice-chat-mic-button:active {
transform: scale(0.95);
}
.voice-chat-error {
margin-top: 0.5rem;
padding: 0.75rem;
background: rgba(220, 38, 38, 0.1);
border: 1px solid var(--accent-red, #dc2626);
border-radius: 8px;
color: var(--accent-red, #dc2626);
font-size: 13px;
}
/* ============================================================================
Voice Notes
============================================================================ */
.voice-notes-container {
background: var(--bg-base, #0a0a0a);
border-radius: 16px;
padding: 1rem;
}
.voice-notes-context {
margin-bottom: 1rem;
}
.voice-notes-context-badge {
display: inline-block;
padding: 0.5rem 0.875rem;
background: var(--bg-elevated, #1a1a1a);
border: 1px solid var(--border-subtle, #333);
border-radius: 8px;
font-size: 13px;
color: var(--text-secondary, #999);
font-weight: 500;
}
.voice-notes-input-wrapper {
position: relative;
}
.voice-notes-input {
width: 100%;
background: var(--bg-elevated, #1a1a1a);
border: 1px solid var(--border-subtle, #333);
border-radius: 12px;
padding: 0.875rem;
font-size: 15px;
color: var(--text-primary, #fff);
resize: vertical;
outline: none;
font-family: inherit;
min-height: 100px;
transition: border-color 0.2s ease;
}
.voice-notes-input:focus {
border-color: var(--accent-red, #dc2626);
}
.voice-notes-input::placeholder {
color: var(--text-tertiary, #666);
}
.voice-notes-controls {
display: flex;
gap: 0.75rem;
margin-top: 0.75rem;
justify-content: flex-end;
}
.voice-notes-mic-button,
.voice-notes-save-button {
min-width: 52px;
min-height: 52px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: none;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
-webkit-tap-highlight-color: transparent;
}
.voice-notes-mic-button {
background: var(--bg-overlay, #222);
color: var(--text-secondary, #999);
}
.voice-notes-mic-button.listening {
background: var(--accent-red, #dc2626);
color: white;
animation: pulse 1.5s infinite;
}
.voice-notes-save-button {
background: var(--accent-red, #dc2626);
color: white;
}
.voice-notes-save-button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.voice-notes-save-button:active,
.voice-notes-mic-button:active {
transform: scale(0.95);
}
.voice-notes-success {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.75rem;
padding: 0.75rem;
background: rgba(34, 197, 94, 0.1);
border: 1px solid #22c55e;
border-radius: 8px;
color: #22c55e;
font-size: 14px;
animation: slideIn 0.3s ease;
}
.voice-notes-error {
margin-top: 0.75rem;
padding: 0.75rem;
background: rgba(220, 38, 38, 0.1);
border: 1px solid var(--accent-red, #dc2626);
border-radius: 8px;
color: var(--accent-red, #dc2626);
font-size: 14px;
}
.voice-notes-list {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-subtle, #333);
}
.voice-notes-list-title {
font-size: 14px;
font-weight: 600;
color: var(--text-secondary, #999);
margin-bottom: 1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.voice-note-card {
background: var(--bg-elevated, #1a1a1a);
border: 1px solid var(--border-subtle, #333);
border-radius: 12px;
padding: 1rem;
margin-bottom: 0.75rem;
transition: all 0.2s ease;
}
.voice-note-card:hover {
border-color: var(--accent-red, #dc2626);
}
.voice-note-content {
color: var(--text-primary, #fff);
font-size: 14px;
line-height: 1.6;
margin-bottom: 0.75rem;
white-space: pre-wrap;
word-wrap: break-word;
}
.voice-note-meta {
display: flex;
justify-content: space-between;
align-items: center;
}
.voice-note-time {
font-size: 12px;
color: var(--text-tertiary, #666);
}
.voice-note-delete {
min-width: 32px;
min-height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: none;
background: transparent;
color: var(--text-tertiary, #666);
cursor: pointer;
transition: all 0.2s ease;
-webkit-tap-highlight-color: transparent;
}
.voice-note-delete:hover {
background: rgba(220, 38, 38, 0.1);
color: var(--accent-red, #dc2626);
}
.voice-note-delete:active {
transform: scale(0.9);
}
/* ============================================================================
Animated Waveform
============================================================================ */
.voice-waveform {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
border-radius: 50%;
}
.voice-waveform::before,
.voice-waveform::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 2px solid currentColor;
opacity: 0;
animation: waveform 2s infinite;
}
.voice-waveform::after {
animation-delay: 1s;
}
@keyframes waveform {
0% {
transform: scale(1);
opacity: 0.5;
}
50% {
opacity: 0.3;
}
100% {
transform: scale(1.5);
opacity: 0;
}
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.05);
opacity: 0.9;
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* ============================================================================
Responsive Design
============================================================================ */
/* Tablet and up */
@media (min-width: 768px) {
.voice-search-input {
font-size: 15px;
}
.voice-chat-message {
max-width: 70%;
}
.voice-notes-input {
min-height: 120px;
}
}
/* Desktop */
@media (min-width: 1024px) {
.voice-chat-container {
max-height: 700px;
}
.voice-chat-message {
max-width: 60%;
}
}
/* ============================================================================
Dark Mode Support (if using separate dark mode class)
============================================================================ */
.dark .voice-search-input-wrapper,
.dark .voice-chat-input,
.dark .voice-notes-input {
background: #1a1a1a;
border-color: #333;
}
.dark .voice-search-input,
.dark .voice-chat-input,
.dark .voice-notes-input {
color: #fff;
}
/* ============================================================================
Accessibility
============================================================================ */
@media (prefers-reduced-motion: reduce) {
.voice-waveform::before,
.voice-waveform::after {
animation: none;
}
.voice-search-mic-button.listening,
.voice-chat-mic-button.listening,
.voice-notes-mic-button.listening {
animation: none;
}
.voice-chat-message,
.voice-notes-success {
animation: none;
}
}
/* High contrast mode */
@media (prefers-contrast: high) {
.voice-search-input-wrapper,
.voice-chat-input,
.voice-notes-input {
border-width: 2px;
}
.voice-search-error,
.voice-chat-error,
.voice-notes-error {
border-width: 2px;
}
}
/* Focus visible for keyboard navigation */
button:focus-visible {
outline: 2px solid var(--accent-red, #dc2626);
outline-offset: 2px;
}