/* Custom Styles for Gobernación del Beni - Civic Excellence Design System */

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: absolute;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 10px 20px;
    background: #004900;
    color: white;
    border-radius: 4px;
    z-index: 9999;
    outline: 2px solid white;
    text-decoration: none;
}

/* High Contrast Mode */
.high-contrast {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #ffff00;
    --border-color: #ffffff;
}
.high-contrast body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}
.high-contrast header,
.high-contrast .bg-white,
.high-contrast .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}
.high-contrast .text-gray-900,
.high-contrast .text-gray-800,
.high-contrast .text-gray-700 {
    color: var(--text-primary) !important;
}
.high-contrast .text-gray-600,
.high-contrast .text-gray-500 {
    color: var(--text-secondary) !important;
}
.high-contrast .border-gray-200,
.high-contrast .border-gray-300 {
    border-color: var(--border-color) !important;
}
.high-contrast a {
    color: var(--text-secondary) !important;
    text-decoration: underline !important;
}
.high-contrast .bg-official {
    background-color: var(--text-secondary) !important;
    color: var(--bg-primary) !important;
}
.high-contrast .text-official {
    color: var(--text-secondary) !important;
}

/* Subtle Hover Animations - Civic Excellence Ambient Shadows */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -4px rgba(0, 73, 0, 0.15), 0 8px 16px -6px rgba(0, 73, 0, 0.1);
}
.hover-scale {
    transition: transform 0.2s ease;
}
.hover-scale:hover {
    transform: scale(1.02);
}
.hover-glow {
    transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 73, 0, 0.15);
}

/* Ambient Card Shadows - Civic Excellence */
.card-ambient {
    box-shadow: 0 2px 8px -2px rgba(0, 73, 0, 0.08), 0 1px 4px -2px rgba(0, 73, 0, 0.05);
}
.card-ambient:hover {
    box-shadow: 0 8px 24px -4px rgba(0, 73, 0, 0.12), 0 4px 12px -4px rgba(0, 73, 0, 0.08);
}

/* Interactive Depth - Civic Excellence */
.interactive-depth {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.interactive-depth:hover {
    box-shadow: 0 4px 12px -2px rgba(0, 73, 0, 0.15);
    border-color: rgba(0, 73, 0, 0.3);
}
.interactive-depth:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 73, 0, 0.15);
}

/* Loading States - Civic Excellence */
.loading-spinner {
    border: 3px solid #f8f9fa;
    border-top: 3px solid #004900;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.skeleton {
    background: linear-gradient(90deg, #f8f9fa 25%, #edeeef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast Notifications - Civic Excellence */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    min-width: 300px;
    padding: 16px;
    border-radius: 4px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 73, 0, 0.15);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.toast.success {
    border-left: 4px solid #82db6f;
}
.toast.error {
    border-left: 4px solid #ba1a1a;
}
.toast.info {
    border-left: 4px solid #004900;
}
.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Leaflet Map z-index fix */
#beni-map {
    position: relative;
    z-index: 1;
}
.leaflet-container {
    z-index: 1 !important;
}
.leaflet-pane {
    z-index: 1 !important;
}
.leaflet-top {
    z-index: 10 !important;
}
.leaflet-bottom {
    z-index: 10 !important;
}
/* Ensure navbar stays above map */
#nav-wrapper {
    z-index: 1000 !important;
}
#main-header {
    z-index: 1001 !important;
}
