/**
 * Low Detail Mode (LDM) styles
 * Reduces animations and visual effects for better performance
 */

/* Base styles for LDM mode */
body.ldm-active {
    /* Disable all transitions globally */
    --transition-default: none !important;
}

/* Disable animations when LDM is active */
body.ldm-active * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
}

/* Static background instead of gradient */
body.ldm-active .gradient-background {
    animation: none !important;
    background: #181818 !important;
}

/* Simplified shadows */
body.ldm-active .container,
body.ldm-active .leftPanel,
body.ldm-active .rightPanel,
body.ldm-active .map-control-button,
body.ldm-active .map-legend,
body.ldm-active .add-mood-button,
body.ldm-active .mood-modal-content,
body.ldm-active .marker-instructions {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Disable backdrop filters (very performance heavy) */
body.ldm-active .container,
body.ldm-active .leftPanel,
body.ldm-active .rightPanel,
body.ldm-active .map-control-button,
body.ldm-active .map-legend,
body.ldm-active .mood-modal,
body.ldm-active .mood-modal-content,
body.ldm-active .marker-instructions,
body.ldm-active .tooltip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(20, 20, 20, 0.85) !important;
}
body.ldm-active .footer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(20, 20, 20, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
/* Simplify button hover effects */
body.ldm-active .leftPanel .ctaButton:hover,
body.ldm-active .leftPanel .secondaryButton:hover,
body.ldm-active .map-control-button:hover,
body.ldm-active .mood-option:hover,
body.ldm-active button:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Remove gradients from text */
body.ldm-active h1 {
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: white !important;
    text-fill-color: unset !important;
    color: white !important;
}

/* Simpler preloader */
body.ldm-active #preloader {
    background: #181818 !important;
}

body.ldm-active #preloader > div {
    animation: none !important;
}

/* Simplify map effects */
body.ldm-active .leaflet-fade-anim .leaflet-tile,
body.ldm-active .leaflet-zoom-anim .leaflet-zoom-animated {
    transition: none !important;
}

body.ldm-active .leaflet-zoom-anim .leaflet-zoom-animated {
    transform: none !important;
}

/* LDM toggle in footer *
.ldm-footer-toggle {
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.ldm-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.ldm-label input {
    margin-right: 6px;
}

/* Make the toggle button clear in map controls */
#ldm-toggle.active {
    background: var(--primary-color) !important; 
}

@media (max-width: 768px) {
    /* Additional optimizations for mobile devices */
    body.ldm-active .city:hover {
        transform: none !important;
    }
    
    body.ldm-active .history-item {
        background: rgba(30, 30, 30, 0.8) !important;
    }
}s