/**
 * SMC Voice Assistant - Frontend Styles
 */

/* Hidden Class */
.smc-voice-hidden {
    display: none !important;
}

/* Voice Control Button */
.smc-voice-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    overflow: hidden;
}

.smc-voice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.5);
}

.smc-voice-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-active 2s ease-in-out infinite;
}

.smc-voice-btn .smc-icon {
    width: 28px;
    height: 28px;
    color: white;
}

.smc-voice-btn .smc-btn-text {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.smc-voice-btn:hover .smc-btn-text {
    opacity: 1;
}

/* Audio Description Button */
.smc-audio-btn {
    bottom: 100px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 8px 20px rgba(250, 112, 154, 0.4);
}

.smc-audio-btn:hover {
    box-shadow: 0 12px 24px rgba(250, 112, 154, 0.5);
}

.smc-audio-btn.active {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    animation: pulse-active 2s ease-in-out infinite;
}

/* Status Box */
.smc-voice-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 9999;
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.smc-status-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.smc-status-icon {
    position: relative;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smc-status-icon .smc-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.smc-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.4);
    animation: pulse-ring 1.5s ease-out infinite;
}

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

@keyframes pulse-active {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.smc-status-text {
    flex: 1;
}

.smc-status-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.smc-status-message {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

.smc-status-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
}

.smc-status-close:hover {
    opacity: 1;
}

.smc-status-close svg {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

/* Audio Description Status */
.smc-audio-status {
    top: auto;
    bottom: 20px;
    right: 20px;
}

.smc-audio-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.smc-audio-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smc-audio-icon .smc-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.smc-audio-text {
    flex: 1;
}

.smc-audio-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.smc-audio-message {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

.smc-audio-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
}

.smc-audio-close:hover {
    opacity: 1;
}

.smc-audio-close svg {
    width: 20px;
    height: 20px;
    color: #4a5568;
}

/* Hover Highlight */
.smc-hover-highlight {
    position: absolute;
    pointer-events: none;
    border: 3px solid #667eea;
    border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    z-index: 9997;
    display: none;
    transition: all 0.2s ease-out;
    background: rgba(102, 126, 234, 0.05);
}

/* Transcript Box (Debug) */
.smc-transcript {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 15px;
    max-width: 400px;
    z-index: 9999;
}

.smc-transcript-header {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smc-transcript-text {
    font-size: 14px;
    color: #1a202c;
    line-height: 1.6;
}

.smc-transcript-text p {
    margin: 8px 0;
}

.smc-transcript-text strong {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smc-voice-btn,
    .smc-audio-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .smc-audio-btn {
        bottom: 80px;
    }
    
    .smc-voice-btn .smc-icon,
    .smc-audio-btn .smc-icon {
        width: 24px;
        height: 24px;
    }
    
    .smc-voice-status,
    .smc-audio-status {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: none;
    }
    
    .smc-audio-status {
        bottom: 160px;
    }
    
    .smc-voice-btn .smc-btn-text {
        display: none;
    }
}

/* Accessibility */
.smc-voice-btn:focus,
.smc-audio-btn:focus,
.smc-status-close:focus,
.smc-audio-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    #smc-voice-assistant {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .smc-voice-btn,
    .smc-audio-btn {
        border: 2px solid currentColor;
    }
    
    .smc-voice-status,
    .smc-audio-status {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .smc-voice-btn,
    .smc-audio-btn,
    .smc-voice-status,
    .smc-hover-highlight,
    .smc-pulse {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .smc-voice-status,
    .smc-audio-status,
    .smc-transcript {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .smc-status-title,
    .smc-audio-title,
    .smc-transcript-text {
        color: #f7fafc;
    }
    
    .smc-status-message,
    .smc-audio-message,
    .smc-transcript-header {
        color: #cbd5e0;
    }
    
    .smc-status-close svg,
    .smc-audio-close svg {
        color: #cbd5e0;
    }
}
