/* Voice Assistant Styles - Mobile Friendly */

.voice-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    user-select: none;
}

.voice-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.voice-btn:active {
    transform: scale(0.95);
}

.voice-btn .mic-icon {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.voice-btn.listening {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: listening-pulse 1.5s infinite;
}

.voice-btn.listening .mic-icon {
    animation: mic-bounce 0.6s infinite;
}

.voice-btn.speaking {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Pulse ring effect */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    animation: pulse-ring 2s infinite;
}

.voice-btn.listening .pulse-ring {
    animation: pulse-ring 1s infinite;
}

/* Transcript Panel */
.transcript-panel {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    z-index: 9998;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.transcript-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.transcript-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: status-blink 2s infinite;
}

.status-text {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.transcript-content {
    padding: 20px;
    min-height: 80px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.transcript-text {
    margin: 0;
    font-size: 16px;
    color: #1f2937;
    text-align: center;
    line-height: 1.6;
}

/* Answer Box */
.answer-box {
    width: 100%;
    text-align: left;
}

.answer-icon {
    font-size: 32px;
    text-align: center;
    margin-bottom: 12px;
}

.answer-text {
    font-size: 15px;
    line-height: 1.7;
    color: #1f2937;
    margin-bottom: 16px;
    padding: 12px;
    background: #f0f9ff;
    border-left: 4px solid #667eea;
    border-radius: 6px;
}

.follow-up {
    text-align: center;
    padding: 10px;
    background: #fef3c7;
    border-radius: 6px;
}

.follow-up small {
    font-size: 12px;
    color: #92400e;
    line-height: 1.4;
}

.command-examples {
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.example-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.examples span {
    display: inline-block;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.examples span:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Suggestions List */
.suggestions-list {
    width: 100%;
}

.suggestions-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.suggestion-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.suggestion-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.4;
}

.suggestion-category {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    background: #667eea;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Animations */
@keyframes listening-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 4px 40px rgba(245, 87, 108, 0.8);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes mic-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes status-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .voice-btn {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .voice-btn .mic-icon {
        width: 24px;
        height: 24px;
    }

    .transcript-panel {
        bottom: 90px;
        right: 20px;
        width: calc(100vw - 40px);
    }

    .transcript-header {
        padding: 14px 16px;
    }

    .transcript-content {
        padding: 16px;
        min-height: 60px;
    }

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

    .command-examples {
        padding: 12px 16px;
    }

    .examples span {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .voice-btn {
        width: 52px;
        height: 52px;
        bottom: 15px;
        right: 15px;
    }

    .voice-btn .mic-icon {
        width: 22px;
        height: 22px;
    }

    .transcript-panel {
        bottom: 80px;
        right: 15px;
        width: calc(100vw - 30px);
    }
}

/* Accessibility */
.voice-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .transcript-panel {
        background: #1f2937;
    }

    .transcript-text {
        color: #f9fafb;
    }

    .command-examples {
        background: #111827;
        border-top-color: #374151;
    }

    .examples span {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .examples span:hover {
        background: #667eea;
        border-color: #667eea;
    }
}
