/* CSS Variables */
:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e3f2fd;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent-primary: #1565C0;
    --accent-dark: #0D47A1;
    --accent-action: #1976D2;
    --accent-red: #d32f2f;
    --border-color: #cccccc;
    --border-light: #eeeeee;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.15);
    --shadow-strong: rgba(0,0,0,0.2);
    --accent-teal: #00796B;
    /* Z-index scale */
    --z-sidebar: 1001;
    --z-header: 1100;
    --z-suggestions: 1200;
    --z-empty-state: 1500;
    --z-overlay: 2000;
    --z-notification: 2001;
    --z-skip-link: 3000;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Heebo', Arial, sans-serif;
    direction: rtl;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--accent-primary);
    color: white;
    padding: 8px 16px;
    z-index: var(--z-skip-link);
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* App Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: var(--z-header);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-battery-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-teal);
    margin: 0;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.header-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 360px;
    padding: 0 16px;
}

.header-search .map-search-container {
    width: 100%;
}

.header-search .map-search-input {
    width: 100%;
    max-width: none;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-search .map-search-input:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.12);
}

/* Visually Hidden (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Main Content Container */
.main-content {
    display: flex;
    position: relative;
    height: 100vh;
    height: 100dvh;
    padding-top: 56px;
}

/* Push Leaflet top controls below the header */
.leaflet-top {
    top: 60px !important;
}

/* Map container */
#map {
    flex: 1;
    height: 100%;
    width: 100%;
}

/* Crosshair cursor on map (inherits to children; no universal * selector needed) */
#map {
    cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><line x1='16' y1='2' x2='16' y2='14' stroke='%23333' stroke-width='1.2'/><line x1='16' y1='18' x2='16' y2='30' stroke='%23333' stroke-width='1.2'/><line x1='2' y1='16' x2='14' y2='16' stroke='%23333' stroke-width='1.2'/><line x1='18' y1='16' x2='30' y2='16' stroke='%23333' stroke-width='1.2'/></svg>") 16 16, crosshair;
}

/* Map Search Control */
.map-search-container {
    position: relative;
}

.map-search-input {
    width: 220px;
    padding: 10px 32px 10px 14px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    direction: rtl;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.2s;
}

.map-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.map-search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear-btn {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--text-secondary);
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    z-index: 2;
}

.search-clear-btn:hover {
    background: var(--text-primary);
}

.map-search-container .search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: var(--z-suggestions);
    display: none;
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.map-search-container .search-suggestions.active {
    display: block;
}

/* Search Suggestions */
.suggestion-item {
    padding: 12px 16px;
    min-height: 44px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--bg-tertiary);
}

.suggestion-item:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    background: var(--bg-tertiary);
}

.suggestion-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
}

.suggestion-name {
    font-weight: 500;
    color: var(--text-primary);
}

.suggestion-city {
    font-size: 12px;
    color: var(--text-muted);
}

/* Basemap Toggle Button */
.basemap-toggle-btn {
    background: var(--bg-secondary);
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-medium);
    transition: all 0.2s;
}

.basemap-toggle-btn svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.basemap-toggle-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.basemap-toggle-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Locate Button */
.locate-btn {
    background: var(--bg-secondary);
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-medium);
    transition: all 0.2s;
    margin-top: 8px;
}

.locate-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.locate-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.locate-btn.active {
    background: var(--accent-teal);
    color: white;
    border-color: var(--accent-teal);
}

.locate-btn.loading {
    color: var(--accent-primary);
    animation: pulse 1s ease-in-out infinite;
    will-change: opacity;
}

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

/* Custom Marker Clusters */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
    contain: layout style paint;
}

.marker-cluster div {
    width: 32px;
    height: 32px;
    margin-inline-start: 4px;
    margin-top: 4px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.marker-cluster-small {
    background-color: rgba(92, 107, 192, 0.5);
}

.marker-cluster-small div {
    background-color: rgba(92, 107, 192, 0.9);
}

.marker-cluster-medium {
    background-color: rgba(126, 87, 194, 0.5);
}

.marker-cluster-medium div {
    background-color: rgba(126, 87, 194, 0.9);
}

.marker-cluster-large {
    background-color: rgba(106, 27, 154, 0.5);
}

.marker-cluster-large div {
    background-color: rgba(106, 27, 154, 0.9);
}

/* Custom Battery Markers */
.battery-marker {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.battery-marker:hover {
    transform: scale(1.2);
}

.battery-marker svg {
    filter: drop-shadow(2px 3px 3px rgba(0,0,0,0.3));
    transition: filter 0.2s ease;
}

.battery-marker:hover svg {
    filter: drop-shadow(2px 3px 5px rgba(0,0,0,0.4));
}

/* Popup styling */
.leaflet-popup-content {
    direction: rtl;
    text-align: right;
    margin: 20px 22px;
    line-height: 1.6;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-medium);
}

.leaflet-popup-content h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent-teal);
    font-size: 18px;
    font-weight: 700;
    padding-inline-start: 24px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.popup-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.popup-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.popup-row .icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.distance {
    color: var(--accent-teal);
    font-weight: bold;
}

/* Leaflet popup close button — WCAG 2.5.5 touch target (44×44px) */
.leaflet-popup-close-button {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
    line-height: 44px !important;
    text-align: center;
    color: var(--text-secondary) !important;
    background: #f0f0f0 !important;
    border-radius: 50% !important;
    top: 4px !important;
    right: 4px !important;
    padding: 0 !important;
    transition: background 0.2s;
}

.leaflet-popup-close-button:hover {
    background: #ddd !important;
    color: var(--text-primary) !important;
}

/* Navigation links in popup */
.nav-links {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.nav-btn {
    flex: 1;
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--accent-teal);
    background: transparent;
    color: var(--accent-teal);
}

.nav-btn:hover {
    background: var(--accent-teal);
    color: white;
}

.nav-btn.google:hover,
.nav-btn.waze:hover {
    background: var(--accent-teal);
    color: white;
}

/* Sidebar */
.sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 380px;
    height: 100%;
    background: var(--bg-secondary);
    box-shadow: 4px 0 20px var(--shadow-medium);
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    will-change: transform;
    overflow: hidden;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--bg-tertiary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.2s;
    z-index: 1;
}

.sidebar-close:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.sidebar-close:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.sidebar-content {
    padding: 60px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}


.sidebar-title {
    flex: 1;
}

.sidebar-title h2 {
    font-size: 20px;
    color: var(--accent-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.sidebar-title .type-badge {
    font-size: 13px;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 12px;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.sidebar-title .type-badge:hover,
.sidebar-title .type-badge:focus {
    background: var(--accent-primary);
    color: white;
}

.sidebar-title .type-badge[aria-expanded="true"] {
    background: var(--accent-teal);
    color: white;
}

.type-explanation {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.type-explanation.visible {
    max-height: 80px;
    opacity: 1;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-top: 8px;
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.info-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.info-text.distance {
    color: var(--accent-action);
    font-weight: 600;
    font-size: 16px;
}

.sidebar-nav {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.sidebar-nav-btn {
    flex: 1;
    padding: 16px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: 2px solid var(--accent-teal);
    background: transparent;
    color: var(--accent-teal);
}

.sidebar-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-medium);
    background: var(--accent-teal);
    color: white;
}

.sidebar-nav-btn.google:hover,
.sidebar-nav-btn.waze:hover {
    background: var(--accent-teal);
    color: white;
}

/* Feedback Like/Dislike Buttons */
.feedback-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    padding-top: 8px;
}

.feedback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.feedback-btn:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.feedback-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.like-btn.liked {
    color: var(--accent-teal);
    border-color: var(--accent-teal);
    background: rgba(0, 121, 107, 0.08);
}

.dislike-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

@keyframes pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.feedback-btn.pop {
    animation: pop 0.4s ease-out;
}

/* Loading Overlay — Skeleton */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay);
    transition: opacity 0.4s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.skeleton-container {
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.skeleton-header {
    width: 100%;
    height: 56px;
    border-radius: 0;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.skeleton-map {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    position: relative;
}

.skeleton-pin {
    position: absolute;
    width: 20px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    background: rgba(0,0,0,0.08);
    transform: rotate(-45deg);
}

.skeleton-cluster {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
}

.skeleton-text {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

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

/* Empty State */
.empty-state {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-empty-state);
    text-align: center;
    background: var(--bg-secondary);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-icon {
    font-size: 48px;
}

.empty-state h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.clear-filters-btn {
    margin-top: 15px;
    padding: 10px 25px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-filters-btn:hover {
    background: var(--accent-dark);
}

.clear-filters-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-secondary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-strong);
    z-index: var(--z-notification);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    font-size: 14px;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Drag zone — hidden on desktop, visible on mobile */
.sidebar-drag-zone {
    display: none;
}

/* WCAG 2.5.8: Leaflet zoom controls touch target (default 30x30) */
.leaflet-control-zoom a {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 22px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-header {
        height: 48px;
        padding: 0 12px;
    }

    .header-title {
        font-size: 17px;
    }

    .header-battery-icon {
        width: 26px;
        height: 26px;
    }

    .header-search {
        position: static;
        transform: none;
        flex: 1;
        max-width: none;
        padding: 0;
        margin-right: 12px;
    }

    .header-search .map-search-input {
        font-size: 14px;
        padding: 8px 28px 8px 12px;
    }

    .main-content {
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        padding-top: 48px;
    }

    .leaflet-top {
        top: 52px !important;
    }

    .skeleton-header {
        height: 48px;
    }

    #map {
        height: 100%;
    }

    .map-search-input {
        width: calc(100vw - 120px);
        max-width: 280px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 60%;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        overscroll-behavior: none;
    }

    .sidebar.hidden {
        transform: translateY(100%);
    }

    .sidebar-close {
        display: none;
    }

    .sidebar-drag-zone {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 28px;
        flex-shrink: 0;
        cursor: grab;
        touch-action: none;
    }

    .sidebar-drag-zone::after {
        content: '';
        width: 40px;
        height: 5px;
        border-radius: 3px;
        background: var(--border-color);
    }

    .sidebar-content {
        padding-top: 8px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .leaflet-popup-content-wrapper {
        max-width: 260px;
    }

    .leaflet-popup-content {
        margin: 14px 16px;
        font-size: 13px;
    }

    .leaflet-popup-content h3 {
        font-size: 16px;
        padding-inline-start: 20px;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 13px;
    }

    .map-search-container .search-suggestions {
        max-height: 40vh;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        width: 50%;
        left: 0;
        bottom: 0;
        top: 0;
    }

    .sidebar.hidden {
        transform: translateX(-100%);
    }

    .sidebar-close {
        left: 15px;
        top: 15px;
        transform: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--bg-tertiary);
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .empty-state {
        width: 85%;
        padding: 25px 20px;
    }
}

/* Disable crosshair cursor on touch devices */
@media (pointer: coarse) {
    #map,
    #map.leaflet-container,
    #map .leaflet-grab,
    #map.leaflet-grab,
    #map .leaflet-interactive,
    #map .leaflet-marker-icon,
    #map .leaflet-marker-shadow,
    #map.leaflet-container:active,
    #map .leaflet-dragging .leaflet-grab,
    #map .leaflet-dragging .leaflet-interactive {
        cursor: default !important;
    }

    .battery-marker {
        cursor: default !important;
        padding: 0 4px;
    }
}

/* Focus indicators for better accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Print stylesheet */
@media print {
    .app-header,
    .sidebar,
    .loading-overlay,
    .empty-state,
    .notification,
    .skip-link,
    .leaflet-control-zoom,
    .leaflet-control-layers,
    .leaflet-control-attribution,
    .search-suggestions {
        display: none !important;
    }

    #map {
        position: static !important;
        width: 100% !important;
        height: 80vh !important;
        page-break-inside: avoid;
    }

    body {
        margin: 0;
        padding: 0;
    }

    .main-content {
        padding-top: 0 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #333333;
        --accent-primary: #005a4f;
        --accent-secondary: #004d40;
    }

    .nav-btn,
    .clear-filters-btn,
    .sidebar-close {
        border: 2px solid #000000;
    }

    a:link {
        text-decoration: underline;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
