/* AI Operations & Command Centre - Custom Styles */

/* Custom scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Transcription message styles */
.transcription-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid transparent;
    animation: fadeInUp 0.3s ease-out;
}

.transcription-message.caller {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border-left-color: #0288d1;
}

.transcription-message.operator {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left-color: #7b1fa2;
}

.transcription-message.system {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left-color: #ffa000;
}

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

/* Case card styles */
.case-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.case-card.selected {
    background: linear-gradient(135deg, #e8f4fd 0%, #d6f0ff 100%);
    border: 2px solid #0284c7;
}

/* Priority indicators */
.priority-low {
    background: #dcfce7;
    color: #166534;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-high {
    background: #fed7d7;
    color: #991b1b;
}

.priority-urgent {
    background: #fce7e7;
    color: #7f1d1d;
    animation: pulse 2s infinite;
}

/* Status indicators */
.status-open {
    background: #dbeafe;
    color: #1e40af;
}

.status-in-progress {
    background: #fef3c7;
    color: #92400e;
}

.status-resolved {
    background: #dcfce7;
    color: #166534;
}

.status-closed {
    background: #f3f4f6;
    color: #374151;
}

/* SOP step styles */
.sop-step {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
}

.sop-step:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.sop-step.completed {
    background: #f0f9f0;
    border-color: #22c55e;
}

.sop-step .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
}

.sop-step.completed .step-number {
    background: #22c55e;
    color: white;
}

/* Sentiment analysis bars */
.sentiment-bar {
    transition: width 0.5s ease-in-out;
}

/* Call interface animations */
.call-ringing {
    animation: ring 1s ease-in-out infinite;
}

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

/* Voice callback visualization */
.voice-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    space-x: 2px;
    height: 40px;
}

.voice-waveform .bar {
    width: 3px;
    background: #3b82f6;
    border-radius: 2px;
    animation: waveform 1.5s ease-in-out infinite;
}

.voice-waveform .bar:nth-child(2) { animation-delay: 0.1s; }
.voice-waveform .bar:nth-child(3) { animation-delay: 0.2s; }
.voice-waveform .bar:nth-child(4) { animation-delay: 0.3s; }
.voice-waveform .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveform {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

/* Toast notification styles */
.toast-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.toast-success #toastIcon {
    background: #22c55e;
}

.toast-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.toast-error #toastIcon {
    background: #ef4444;
}

.toast-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
}

.toast-warning #toastIcon {
    background: #f59e0b;
}

.toast-info {
    background: #eff6ff;
    border: 1px solid #dbeafe;
}

.toast-info #toastIcon {
    background: #3b82f6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-effect {
        padding: 16px;
    }
    
    .transcription-message {
        padding: 8px;
    }
    
    .sop-step {
        padding: 8px;
    }
    
    .case-card {
        padding: 12px;
    }
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Explainability highlights */
.ai-explanation {
    position: relative;
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
    margin-top: 8px;
}

.ai-explanation::before {
    content: "AI";
    position: absolute;
    top: -8px;
    left: 12px;
    background: #0ea5e9;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* Interactive elements */
.interactive-element {
    transition: all 0.2s ease-in-out;
}

.interactive-element:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Progress indicators */
.progress-ring {
    width: 40px;
    height: 40px;
}

.progress-ring circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* Custom form elements */
.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .glass-effect {
        background-color: rgba(31, 41, 55, 0.8);
        border: 1px solid rgba(107, 114, 128, 0.3);
        color: #f9fafb;
    }
}