/* Custom styles for the Disease Outbreak Dashboard */

/* Gradient background with subtle virus/bacteria pattern */
body {
    background: linear-gradient(135deg, #1a1d29 0%, #2d1b3d 50%, #1a2332 100%);
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(220, 53, 69, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(13, 110, 253, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(25, 135, 84, 0.3) 0%, transparent 50%);
    background-size: 800px 800px, 600px 600px, 700px 700px;
    background-position: 0% 0%, 100% 100%, 50% 50%;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Ccircle cx='30' cy='30' r='8'/%3E%3Ccircle cx='10' cy='10' r='3'/%3E%3Ccircle cx='50' cy='50' r='3'/%3E%3Ccircle cx='10' cy='50' r='2'/%3E%3Ccircle cx='50' cy='10' r='2'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: floatPattern 60s linear infinite;
}

@keyframes floatPattern {
    0% { background-position: 0 0; }
    100% { background-position: 120px 120px; }
}

/* Ensure content stays above background */
.navbar,
.container,
.modal {
    position: relative;
    z-index: 1;
}

.stat-item {
    padding: 0.5rem 0;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: bold;
}

.outbreak-marker {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outbreak-marker i {
    font-size: 16px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}

.outbreak-popup {
    min-width: 250px;
}

.outbreak-popup h6 {
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

.outbreak-popup p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--bs-dark);
}

.outbreak-title {
    cursor: help;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.card {
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-dark);
}

.card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--bs-border-color);
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#map {
    border-radius: 0 0 0.375rem 0.375rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.toast-container {
    z-index: 1055;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .outbreak-title {
        max-width: 200px;
    }
    
    #map {
        height: 400px !important;
    }
    
    .card-body canvas {
        max-height: 250px !important;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
}

.table-responsive {
    border-radius: 0.375rem;
}

/* Chart containers */
.card-body canvas {
    background-color: transparent;
}

/* Improve readability of chart text in dark theme */
.chart-container {
    background-color: var(--bs-dark);
    border-radius: 0.375rem;
}
