/* Enhanced GBV Dashboard Styles */

/* 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: #a8a8a8;
}

/* Loading animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard specific styles */
.dashboard-tab {
    transition: all 0.2s ease-in-out;
}

.dashboard-tab:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.dashboard-tab.active {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Card hover effects */
.shadow:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out;
}

/* Table row hover */
table tbody tr:hover {
    background-color: rgba(249, 250, 251, 1);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

/* Priority indicators */
.priority-critical::before {
    content: "🔴";
    margin-right: 0.25rem;
}

.priority-high::before {
    content: "🟠";
    margin-right: 0.25rem;
}

.priority-medium::before {
    content: "🟡";
    margin-right: 0.25rem;
}

.priority-low::before {
    content: "🟢";
    margin-right: 0.25rem;
}

/* Chart containers */
canvas {
    max-height: 300px !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .grid-cols-1.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr 1fr;
    }
    
    .overflow-x-auto {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .shadow {
        box-shadow: none !important;
    }
    
    .bg-gray-50 {
        background-color: white !important;
    }
}

/* 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-width: 0;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Error states */
.error-message {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.success-message {
    background-color: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

/* Data visualization enhancements */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.125rem;
    margin-right: 0.5rem;
}

/* Form styles for case management */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.form-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button styles */
.btn-primary {
    background-color: #3B82F6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #2563EB;
}

.btn-secondary {
    background-color: #6B7280;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #4B5563;
}

/* Modal styles for future use */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* Map container styles for geographic view */
.map-container {
    height: 400px;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

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

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