/**
 * Voice Search UI Styles
 * Voice button, listening animation, and results
 */

/* Voice Search Button */
.voice-search-btn {
    position: relative;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.voice-search-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: #FFB81C;
    color: #FFB81C;
}

.voice-search-btn.listening {
    background: #dc3545;
    border-color: #dc3545;
    animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

.voice-search-icon {
    width: 20px;
    height: 20px;
}

/* Voice Search Modal */
.voice-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 30, 66, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.voice-search-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.voice-search-content {
    background: white;
    border-radius: 24px;
    padding: 48px;
    max-width: 500px;
    width: calc(100% - 40px);
    text-align: center;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.voice-search-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-search-close:hover {
    background: #e0e0e0;
    color: #041E42;
}

/* Listening Animation */
.voice-listening-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.voice-microphone-icon {
    width: 60px;
    height: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545;
}

.voice-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 3px solid #dc3545;
    border-radius: 50%;
    opacity: 0;
}

.voice-wave:nth-child(1) {
    animation: waveExpand 2s ease-out infinite;
}

.voice-wave:nth-child(2) {
    animation: waveExpand 2s ease-out 0.5s infinite;
}

.voice-wave:nth-child(3) {
    animation: waveExpand 2s ease-out 1s infinite;
}

@keyframes waveExpand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.8;
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

/* Voice Status Text */
.voice-status-text {
    font-size: 20px;
    font-weight: 600;
    color: #041E42;
    margin-bottom: 8px;
}

.voice-status-subtext {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

/* Transcript Display */
.voice-transcript {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 20px;
    min-height: 60px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-transcript-text {
    font-size: 16px;
    color: #041E42;
    line-height: 1.5;
}

.voice-transcript-placeholder {
    font-size: 14px;
    color: #999;
    font-style: italic;
}

/* Voice Actions */
.voice-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.voice-action-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.voice-action-btn-primary {
    background: #dc3545;
    color: white;
}

.voice-action-btn-primary:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.voice-action-btn-secondary {
    background: #f0f0f0;
    color: #041E42;
}

.voice-action-btn-secondary:hover {
    background: #e0e0e0;
}

/* Voice Search Results */
.voice-search-results {
    margin-top: 24px;
    text-align: left;
}

.voice-results-title {
    font-size: 16px;
    font-weight: 600;
    color: #041E42;
    margin-bottom: 12px;
}

.voice-result-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-result-item:hover {
    background: #e9ecef;
}

.voice-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #041E42;
    margin-bottom: 4px;
}

.voice-result-description {
    font-size: 13px;
    color: #666;
}

/* Voice Indicator in Nav */
.voice-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #dc3545;
    border-radius: 50%;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    z-index: 9998;
    animation: voicePulse 1.5s ease-in-out infinite;
}

.voice-indicator.active {
    display: flex;
}

/* Unsupported Browser Message */
.voice-unsupported {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    color: #856404;
    font-size: 14px;
}

.voice-unsupported-title {
    font-weight: 600;
    margin-bottom: 4px;
}

/* Language Selector */
.voice-language-selector {
    margin-bottom: 24px;
}

.voice-language-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.voice-language-select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #041E42;
    background: white;
    cursor: pointer;
}

.voice-language-select:focus {
    outline: none;
    border-color: #FFB81C;
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-search-btn {
        width: 40px;
        height: 40px;
        margin-left: 8px;
    }

    .voice-search-icon {
        width: 18px;
        height: 18px;
    }

    .voice-search-content {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .voice-listening-animation {
        width: 100px;
        height: 100px;
    }

    .voice-microphone-icon {
        width: 48px;
        height: 48px;
    }

    .voice-wave:nth-child(3) {
        display: none;
    }

    .voice-status-text {
        font-size: 18px;
    }

    .voice-actions {
        flex-direction: column;
    }

    .voice-action-btn {
        width: 100%;
    }

    .voice-indicator {
        bottom: 80px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .voice-search-content {
        padding: 24px 20px;
    }

    .voice-listening-animation {
        width: 80px;
        height: 80px;
    }

    .voice-microphone-icon {
        width: 40px;
        height: 40px;
    }

    .voice-status-text {
        font-size: 16px;
    }

    .voice-transcript {
        padding: 12px 16px;
    }
}
