/* Voice Controls Styles */
.voice-controls {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-controls.unsupported {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.voice-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--bg-secondary, #f8fafc);
    transition: all 0.3s ease;
}

.voice-status.active {
    background: #dbeafe;
    color: #1e40af;
}

.voice-status.listening {
    background: #fef3c7;
    color: #92400e;
    animation: pulse 1.5s infinite;
}

.voice-status.speaking {
    background: #d1fae5;
    color: #065f46;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status-text {
    font-weight: 500;
    font-size: 14px;
}

.voice-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #2563eb);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    justify-content: center;
}

.voice-btn:hover:not(:disabled) {
    background: var(--primary-hover, #1d4ed8);
    transform: translateY(-1px);
}

.voice-btn:active {
    transform: translateY(0);
}

.voice-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.voice-btn.record-btn {
    background: #dc2626;
}

.voice-btn.record-btn:hover:not(:disabled) {
    background: #b91c1c;
}

.voice-btn.stop-btn {
    background: #7c2d12;
}

.voice-btn.stop-btn:hover {
    background: #92400e;
}

.voice-btn.settings-btn {
    background: #6b7280;
}

.voice-btn.settings-btn:hover {
    background: #4b5563;
}

.btn-icon {
    font-size: 16px;
}

.btn-text {
    font-size: 14px;
}

.voice-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.voice-feedback.input {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
}

.voice-feedback.response {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

.voice-feedback.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.feedback-content {
    margin: 0;
}

.voice-info {
    text-align: center;
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    line-height: 1.5;
}

.voice-info p {
    margin: 8px 0;
}

/* Voice Settings Modal */
.voice-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.voice-settings-modal .modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.voice-settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.voice-settings-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.voice-settings-modal .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.voice-settings-modal .close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.voice-settings-modal .modal-body {
    padding: 20px;
}

.voice-settings-modal .setting-group {
    margin-bottom: 20px;
}

.voice-settings-modal .setting-group:last-child {
    margin-bottom: 0;
}

.voice-settings-modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.voice-settings-modal select,
.voice-settings-modal input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.voice-settings-modal input[type="range"] {
    padding: 0;
    height: 6px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.voice-settings-modal input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color, #2563eb);
    border-radius: 50%;
    cursor: pointer;
}

.voice-settings-modal input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color, #2563eb);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.voice-settings-modal .range-value {
    display: inline-block;
    margin-left: 8px;
    font-weight: 500;
    color: #6b7280;
    min-width: 30px;
}

.voice-settings-modal .modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

.voice-settings-modal .primary-btn {
    background: var(--primary-color, #2563eb);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.voice-settings-modal .primary-btn:hover {
    background: var(--primary-hover, #1d4ed8);
}

/* Voice Toggle Button for Main UI */
.voice-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color, #2563eb);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-toggle-btn:hover {
    background: var(--primary-hover, #1d4ed8);
    transform: scale(1.1);
}

.voice-toggle-btn.active {
    background: #dc2626;
    animation: pulse 1.5s infinite;
}

.voice-toggle-btn.active:hover {
    background: #b91c1c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-controls {
        margin: 12px 0;
        padding: 12px;
    }
    
    .voice-buttons {
        gap: 8px;
    }
    
    .voice-btn {
        padding: 10px 16px;
        min-width: 80px;
        font-size: 13px;
    }
    
    .voice-toggle-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .voice-settings-modal .modal-content {
        width: 95%;
        margin: 20px;
    }
}