/**
 * Voice Search Styles
 */

/* Voice search button */
.voice-search-btn {
    position: relative;
    transition: all 0.3s ease;
}

.voice-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.voice-search-btn.recording {
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* Recording indicator overlay */
.voice-recording-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: var(--color-bg-card, white);
    border: 1px solid var(--color-border-primary, #dee2e6);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: none;
}

.recording-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-primary, #212529);
}

.recording-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.1);
    animation: pulse-expand 1.5s infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -10px;
}

@keyframes pulse-expand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Processing indicator */
.voice-processing-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: var(--color-bg-card, white);
    border: 1px solid var(--color-border-primary, #dee2e6);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: none;
}

.processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-primary, #212529);
}

/* Confirmation popup */
.voice-search-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: var(--color-bg-card, white);
    border: 1px solid var(--color-border-primary, #dee2e6);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: none;
    min-width: 350px;
    max-width: 90%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.voice-confirmation-content h6 {
    color: var(--color-text-primary, #212529);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.voice-confirmation-content p {
    color: var(--color-text-secondary, #6c757d);
    font-size: 0.95rem;
}

.route-display {
    background: var(--color-bg-secondary, #f8f9fa);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-display .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Voice search settings panel */
.voice-settings-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-bg-card, white);
    border: 1px solid var(--color-border-primary, #dee2e6);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    min-width: 300px;
}

.voice-settings-panel.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voice-settings-panel h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--color-text-primary, #212529);
}

.provider-option {
    padding: 0.75rem;
    border: 2px solid var(--color-border-primary, #dee2e6);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-option:hover {
    border-color: var(--color-primary, #0d6efd);
    background: var(--color-bg-secondary, #f8f9fa);
}

.provider-option.active {
    border-color: var(--color-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.1);
}

.provider-option .provider-name {
    font-weight: 600;
    color: var(--color-text-primary, #212529);
    margin-bottom: 0.25rem;
}

.provider-option .provider-description {
    font-size: 0.85rem;
    color: var(--color-text-secondary, #6c757d);
    margin: 0;
}

/* Backdrop for modals */
.voice-search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.voice-search-backdrop.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .voice-search-confirmation {
        min-width: 90%;
        padding: 1.5rem;
    }

    .voice-settings-panel {
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .route-display .badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}
