/**
 * Voice Chat Widget CSS
 * Scoped styles für Integration in alderspach.de
 * Alle Selektoren unter .voice-chat-widget Namespace
 */

/* Widget Wrapper */
.voice-chat-widget {
    text-align: center;
    padding: 2rem 0;
}

/* Status Section */
.voice-chat-widget .status-section {
    text-align: center;
    margin-bottom: 2rem;
}

.voice-chat-widget .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border-radius: 25px;
    font-weight: 500;
}

.voice-chat-widget .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
    animation: voice-chat-pulse 2s infinite;
}

@keyframes voice-chat-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.voice-chat-widget .status-indicator.connecting .status-dot {
    background: #ffc107;
}

.voice-chat-widget .status-indicator.error .status-dot {
    background: #dc3545;
    animation: none;
}

.voice-chat-widget .status-indicator.recording .status-dot {
    background: #dc3545;
    animation: voice-chat-blink 0.5s infinite;
}

@keyframes voice-chat-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Voice Control */
.voice-chat-widget .voice-control {
    text-align: center;
    margin: 2rem 0;
}

.voice-chat-widget .voice-button {
    width: 137px;
    height: 137px;
    border-radius: 50%;
    border: none;
    background: tan;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.voice-chat-widget .voice-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(234, 221, 102, 0.842);
}

.voice-chat-widget .voice-button:active:not(:disabled) {
    transform: scale(0.95);
}

.voice-chat-widget .voice-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.voice-chat-widget .voice-button.recording {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    animation: voice-chat-recordPulse 1s infinite;
}

@keyframes voice-chat-recordPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-chat-widget .button-icon {
    font-size: 3rem;
}

.voice-chat-widget .button-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.voice-chat-widget .hint {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Clear Button */
.voice-chat-widget .clear-button {
    margin-top: 1.5rem;
    padding: 0.5rem 1.5rem;
    border: 2px solid tan;
    background: transparent;
    color: tan;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-chat-widget .clear-button:hover:not(:disabled) {
    background: tan;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 180, 140, 0.4);
}

.voice-chat-widget .clear-button:active:not(:disabled) {
    transform: translateY(0);
}

.voice-chat-widget .clear-button:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

/* Error Section */
.voice-chat-widget .error-section {
    margin: 2rem auto;
    max-width: 600px;
}

.voice-chat-widget .error-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: voice-chat-shake 0.5s ease-in-out;
}

@keyframes voice-chat-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.voice-chat-widget .error-icon {
    font-size: 1.5rem;
}

.voice-chat-widget .error-text {
    color: #856404;
    flex: 1;
    text-align: left;
}

/* Loading Animation */
.voice-chat-widget .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: voice-chat-spin 1s ease-in-out infinite;
}

@keyframes voice-chat-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-chat-widget .voice-button {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }

    .voice-chat-widget .button-icon {
        font-size: 2.5rem;
    }

    .voice-chat-widget {
        padding: 1rem 0;
    }
}

/* Mobile Touch Optimization */
@media (max-width: 480px) {
    .voice-chat-widget .voice-button {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }

    .voice-chat-widget .button-icon {
        font-size: 2rem;
    }

    .voice-chat-widget .button-text {
        font-size: 0.7rem;
    }
}
