/* Voice Control System Styles */

/* Hero image long-press styles */
.hero-img[data-voice-enabled="true"],
img[alt*="Ruth"][data-voice-enabled="true"],
img[alt*="ruth"][data-voice-enabled="true"],
img[alt*="Gibson"][data-voice-enabled="true"],
img[alt*="profile"][data-voice-enabled="true"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    cursor: pointer;
    position: relative;
}

.hero-img[data-voice-enabled="true"]:active,
img[alt*="Ruth"][data-voice-enabled="true"]:active {
    opacity: 0.9;
    transform: scale(0.98);
    transition: all 0.2s ease;
}

/* Authentication Overlay */
.voice-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.auth-dialog {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    text-align: center;
}

.google-signin-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

#google-signin-button {
    display: inline-block;
}

.auth-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.auth-info small {
    color: #666;
    font-size: 0.85rem;
}

.cancel-btn {
    padding: 0.75rem 2rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #545b62;
}

.google-signin-fallback {
    padding: 0.75rem 1.5rem;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-dialog h2 {
    margin: 0 0 1rem 0;
    color: #333;
}

.auth-dialog input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin: 1rem 0;
    transition: border-color 0.3s;
}

.auth-dialog input:focus {
    outline: none;
    border-color: #007bff;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-buttons button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-buttons button[type="submit"] {
    background: #007bff;
    color: white;
}

.auth-buttons button[type="submit"]:hover {
    background: #0056b3;
}

.auth-buttons button[type="button"] {
    background: #6c757d;
    color: white;
}

.auth-buttons button[type="button"]:hover {
    background: #545b62;
}

/* Voice Interface Overlay */
.voice-interface-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.voice-dialog {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
    position: relative;
}

/* Close button for voice dialog */
.voice-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.voice-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Voice Visualizer */
.voice-visualizer {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.voice-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 48px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.voice-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

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

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(102, 126, 234, 0.3);
    transform: translate(-50%, -50%);
    animation: pulseRing 2s infinite;
}

.pulse-ring:nth-child(2) {
    animation-delay: 0.5s;
}

.voice-button.recording ~ .pulse-ring {
    border-color: rgba(245, 87, 108, 0.3);
    animation-duration: 1s;
}

/* Voice Status and Transcript */
.voice-status {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.voice-transcript {
    min-height: 60px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
}

.voice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.voice-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

#submitVoice {
    background: #28a745;
    color: white;
}

#submitVoice:hover {
    background: #218838;
}

#cancelVoice {
    background: #dc3545;
    color: white;
}

#cancelVoice:hover {
    background: #c82333;
}

/* Floating Action Button */
.voice-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

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

/* Toast Notifications */
.voice-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    animation: slideUpFade 0.3s ease;
}

.voice-toast.success {
    background: #28a745;
}

.voice-toast.error {
    background: #dc3545;
}

/* Approve PR Button */
.approve-pr-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.approve-pr-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.approve-pr-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

@keyframes slideUpFade {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 10px 50px rgba(245, 87, 108, 0.8);
    }
    100% {
        box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .voice-fab {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .auth-dialog,
    .voice-dialog {
        width: 95%;
        padding: 1.5rem;
    }
    
    .voice-button {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-dialog,
    .voice-dialog {
        background: #2d2d2d;
        color: #fff;
    }
    
    .auth-dialog h2 {
        color: #fff;
    }
    
    .auth-dialog input {
        background: #1a1a1a;
        border-color: #444;
        color: #fff;
    }
    
    .voice-transcript {
        background: #1a1a1a;
        color: #fff;
    }
    
    .voice-status {
        color: #bbb;
    }
}