/* Custom Animations */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out;
}

.animate-slide-up {
    animation: slide-up 0.6s ease-out;
}

.animate-scale-in {
    animation: scale-in 0.5s ease-out;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Map Container */
#map {
    height: 100%;
    width: 100%;
    border-radius: 1rem;
}

/* Pulse Animation for Live Indicators */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    animation: pulse-ring 1.5s ease-out infinite;
}

/* Emergency Card Styles */
.emergency-card {
    transition: all 0.3s ease;
}

.emergency-card:hover {
    transform: translateX(4px);
}

/* Status Badges */
.status-critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.status-high {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.status-medium {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}

.status-low {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Voice Wave Animation */
.voice-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 30px;
}

.voice-wave span {
    width: 4px;
    background: currentColor;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { animation-delay: 0s; height: 10px; }
.voice-wave span:nth-child(2) { animation-delay: 0.1s; height: 20px; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; height: 15px; }
.voice-wave span:nth-child(4) { animation-delay: 0.3s; height: 25px; }
.voice-wave span:nth-child(5) { animation-delay: 0.4s; height: 12px; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* IVR Phone Styles */
.phone-frame {
    background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
    border-radius: 40px;
    padding: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.phone-screen {
    background: #000;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 9/16;
}

/* Admin Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Heatmap Overlay */
.heatmap-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
        rgba(239, 68, 68, 0.3) 0%, 
        rgba(249, 115, 22, 0.2) 30%, 
        transparent 70%);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}