/* ==========================================
   V16 Beacon Map - Design System
   ========================================== */

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #FF6B35;
    --color-primary-hover: #FF5722;
    --color-active: #FF6B35;
    --color-recent: #6B7280;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;

    /* New Petrol Theme */
    --bg-petrol: rgba(37, 78, 88, 0.9);
    --border-petrol: rgba(255, 255, 255, 0.1);

    /* Background */
    --bg-dark: #000000;
    --bg-darker: #111111;
    --bg-card: rgba(0, 0, 0, 0.65);
    /* Reduced from 0.8 */
    --bg-glass: rgba(0, 0, 0, 0.65);
    /* Reduced from 0.8 */
    --bg-glass-heavy: rgba(0, 0, 0, 0.75);
    /* Reduced from 0.9 */

    /* Text */
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);

    /* Border */
    --border-color: rgba(255, 255, 255, 0.15);
    --border-radius: 16px;
    --border-radius-sm: 12px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Z-index */
    --z-map: 1;
    --z-controls: 1000;
    --z-panels: 1001;
    --z-modal: 1100;
    --z-loading: 1200;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Island (Status Bar) */
.status-bar {
    position: fixed;
    top: 20px;
    /* Floating from top */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 44px;
    /* Pill height */

    background: rgba(0, 0, 0, 0.8);
    /* Darker base for liquid feel */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    /* Full pill shape */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    z-index: var(--z-panels);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    /* Tight padding for island feel */

    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: islandFloat 1s ease-out;
}

@keyframes islandFloat {
    0% {
        transform: translate(-50%, -100%);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Hover effect for interactivity */
.status-bar:hover {
    transform: translateX(-50%) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
}

.status-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    height: 100%;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse 2s infinite;
}

.status-dot.active {
    background: var(--color-success);
}

.status-dot.error {
    background: var(--color-error);
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.update-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.timer-value {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    /* Monospaced numbers to prevent jumping */
}

.refresh-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.refresh-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Map Container */
.map-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-map);
}

#map {
    width: 100%;
    height: 100%;
    background: #000;
    /* Ensure dark background behind tiles */
}

/* iOS Dark Mode Filter */
.map-ios-dark .leaflet-layer .leaflet-tile-container {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%) saturate(140%);
    -webkit-filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%) saturate(140%);
}

/* Custom Zoom Controls */
/* Custom Zoom Controls */
.custom-controls {
    position: fixed;
    top: 70px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: var(--z-controls);
}

.zoom-group {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.zoom-divider {
    height: 1px;
    background: var(--border-color);
    width: 100%;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.geo-btn {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.geo-btn:hover {
    filter: brightness(1.2);
}

.geo-btn i {
    transform: none;
    font-size: 18px;
}

/* Stats Panel */
.stats-panel {
    position: fixed;
    bottom: 45px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: var(--z-panels);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    /* More rounded */
    padding: 12px 16px;
    min-width: 140px;
    transition: var(--transition-normal);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.stat-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.active-stat .stat-icon {
    background: rgba(255, 107, 53, 0.2);
    color: var(--color-active);
}

.recent-stat .stat-icon {
    background: rgba(107, 114, 128, 0.2);
    color: var(--color-recent);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.active-stat .stat-value {
    color: #ff8c61;
    /* Lighter orange for better contrast */
}

.recent-stat .stat-value {
    color: #d1d5db;
    /* Lighter grey (Text Secondary) */
}

.recent-stat .stat-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

/* Legend Panel */
/* Legend Panel (Expandable) */
.legend-panel {
    position: fixed;
    bottom: 20px;
    left: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    /* Default expanded radius */
    padding: 0;
    z-index: var(--z-panels);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Animation props */
    width: 160px;
    /* Expanded Width */
    height: auto;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom left;
}

/* Collapsed State (Like a button) */
.legend-panel.collapsed {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--bg-glass);
}

.legend-panel.collapsed:hover {
    transform: scale(1.05);
    background: var(--bg-card);
}

.legend-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
}

.legend-content {
    padding: 16px 16px 16px 48px;
    /* Left padding for icon space if we keep icon visible, or just transition */
    opacity: 1;
    transition: opacity 0.3s ease 0.1s;
    white-space: nowrap;
}

.legend-panel.collapsed .legend-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Hide icon or change it when expanded? 
   User asked: "icon small... click... expands".
   I will keep the icon visible as the "anchor" 
   but maybe hide it in the expanded header to avoid duplication if header says 'LEYENDA'
   Actually, let's keep the icon in the corner as part of the header.
*/
.legend-panel:not(.collapsed) .legend-btn {
    /* Optional: move or hide. Let's keep it as the "close/toggle" anchor */
    color: var(--text-muted);
}

.legend-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #e5e7eb;
    font-weight: 500;
}

.legend-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-marker.active {
    background: var(--color-active);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.legend-marker.recent {
    background: var(--color-recent);
}

.legend-marker.recent {
    background: var(--color-recent);
}

@keyframes markerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.1);
    }
}

/* FAQ Toggle Button */
.faq-toggle {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-normal);
    z-index: var(--z-panels);
}

.faq-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--color-primary);
}

/* FAQ Modal */
/* FAQ Modal Premium */
.faq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.faq-modal.active {
    opacity: 1;
    visibility: visible;
}

.faq-content {
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: #1e1e1e;
    /* Fallback */
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-modal.active .faq-content {
    transform: scale(1) translateY(0);
}

.faq-header {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.faq-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Scrollbar for FAQ */
.faq-body::-webkit-scrollbar {
    width: 6px;
}

.faq-body::-webkit-scrollbar-track {
    background: transparent;
}

.faq-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #e5e7eb;
}

.faq-item p {
    font-size: 14px;
    line-height: 1.6;
    color: #9ca3af;
    margin: 0;
}

.faq-footer-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    letter-spacing: 1px;
}


.faq-modal.active .faq-content {
    transform: translateY(0);
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.faq-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-header h2 i {
    color: var(--color-primary);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
    font-size: 18px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.faq-body {
    padding: 24px;
    overflow-y: auto;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-darker);
    z-index: var(--z-loading);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: var(--transition-normal);
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    font-size: 14px;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 70px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: var(--z-modal);
}

.toast {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 250px;
}

.toast.success {
    border-left: 3px solid var(--color-success);
}

.toast.error {
    border-left: 3px solid var(--color-error);
}

.toast.info {
    border-left: 3px solid var(--color-primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
    background: rgba(10, 10, 10, 0.9) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 340px !important;
}

.leaflet-popup-tip {
    background: var(--bg-dark) !important;
}

/* Modern Popup Styles */
.beacon-popup-modern {
    padding: 0;
}

.beacon-header-hero {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.beacon-header-hero.recent {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
}

.beacon-icon-hero {
    width: 48px;
    height: 48px;
    background: rgba(255, 107, 53, 0.2);
    color: var(--color-active);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.beacon-header-hero.recent .beacon-icon-hero {
    background: rgba(107, 114, 128, 0.2);
    color: var(--color-recent);
    box-shadow: none;
}

.beacon-road-info {
    flex: 1;
}

.beacon-road-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.beacon-km {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.beacon-details {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-item i {
    width: 16px;
    color: var(--text-muted);
}

.beacon-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 4px 20px 20px 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.action-btn-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn-circle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Specific Colors */
/* Grid layout update */
.beacon-actions-grid.four-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* Specific Colors */
.action-btn-circle.google {
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
    border: none;
    color: white;
}

.action-btn-circle.waze {
    background: #33ccff;
    border: none;
    color: white;
}

.action-btn-circle.apple {
    background: linear-gradient(135deg, #000000 0%, #555555 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.action-btn-circle.share {
    background: rgba(255, 255, 255, 0.1);
}

.action-btn-circle.share:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-item span {
    font-size: 11px;
    /* Slightly smaller for 4 items */
    color: var(--text-muted);
    font-weight: 500;
}

/* New Detail Styles */
.detail-item.prominent {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.beacon-timer {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* User Location Marker */
.user-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.user-dot {
    width: 12px;
    height: 12px;
    background: #4285F4;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.user-pulse {
    position: absolute;
    width: 24px;
    height: 24px;
    background: rgba(66, 133, 244, 0.4);
    border-radius: 50%;
    z-index: 1;
    animation: userPulse 2s infinite;
}

@keyframes userPulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Leaflet Controls Override */
.leaflet-control-zoom {
    display: none;
}

.leaflet-control-attribution {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 10px !important;
    font-size: 11px !important;
    color: var(--text-muted) !important;
    border-radius: var(--border-radius-sm) 0 0 0 !important;
}

.leaflet-control-attribution a {
    color: var(--text-secondary) !important;
}

/* Custom Marker Styles */
.custom-beacon-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.beacon-marker-inner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
}

.beacon-marker-inner.active {
    background: var(--color-active);
    animation: beaconPulse 2s infinite;
}

.beacon-marker-inner.recent {
    background: var(--color-recent);
}

@keyframes beaconPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(255, 107, 53, 0);
    }
}

/* Marker Cluster Styles */
.marker-cluster {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(10px);
    border: 2px solid var(--color-primary) !important;
}

.marker-cluster div {
    background: var(--color-primary) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.marker-cluster-small {
    background: rgba(255, 107, 53, 0.6) !important;
}

.marker-cluster-medium {
    background: rgba(255, 107, 53, 0.7) !important;
}

.marker-cluster-large {
    background: rgba(255, 107, 53, 0.8) !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .status-content {
        font-size: 13px;
    }

    .stats-panel {
        bottom: 80px;
        right: 10px;
    }

    .stat-item {
        padding: 10px 12px;
        min-width: 120px;
    }

    .stat-value {
        font-size: 20px;
    }

    .legend-panel {
        bottom: 80px;
        left: 10px;
    }

    .faq-toggle {
        padding: 8px 16px;
        font-size: 12px;
    }

    .custom-controls {
        top: 60px;
        left: 10px;
    }

    .control-btn {
        width: 32px;
        height: 32px;
    }

    .faq-content {
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .status-bar {
        height: 44px;
    }

    .map-container {
        top: 44px;
    }

    .status-content {
        gap: 12px;
    }

    .status-text {
        display: none;
    }

    .stats-panel {
        flex-direction: row;
        bottom: auto;
        top: 56px;
        right: 10px;
    }

    .stat-item {
        flex-direction: column;
        min-width: auto;
        padding: 8px 12px;
    }

    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .legend-panel {
        display: none;
    }
}