/* ========================================
   HOME PAGE STYLES (Map Dashboard)
   Dedicated stylesheet for Home.razor
   ======================================== */

/* ========== PAGE OVERFLOW PREVENTION ========== */
/* Prefer explicit home-route classes from MainLayout for reliable full-screen map sizing */
.app-content--map,
.app-content--map .lbsa-container-fluid--map,
.app-content--map .lbsa-container-fluid--map .page-transition-wrapper,
.app-content--map .lbsa-container-fluid--map .page-content {
    overflow: hidden !important;
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    scrollbar-gutter: auto !important;
}

/* ========== MAP CONTAINER ========== */
.map-container {
    height: 100%;
    min-height: 100%;
    width: 100%;
    position: relative;
    background: #2d3748;
    overflow: hidden;
}

.home-map-state-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
    background:
        radial-gradient(circle at 50% 42%, rgba(0, 188, 212, 0.12), transparent 34rem),
        rgba(8, 14, 18, 0.86);
}

.home-map-status-card {
    width: min(92vw, 420px);
    min-height: 168px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid rgba(0, 188, 212, 0.34);
    border-radius: 8px;
    background: rgba(20, 24, 27, 0.94);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 24px rgba(0, 188, 212, 0.12);
    backdrop-filter: blur(10px);
}

.home-map-status-spinner {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 50%;
    border: 4px solid rgba(0, 188, 212, 0.16);
    border-top-color: #2196f3;
    border-right-color: #00bcd4;
    animation: home-map-spin 0.85s linear infinite;
}

.home-map-status-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 188, 212, 0.14);
    border: 1px solid rgba(0, 188, 212, 0.3);
    color: #00bcd4;
    font-size: 1.65rem;
}

.home-map-status-copy h2 {
    margin: 0 0 0.35rem;
    color: rgba(255, 255, 255, 0.94);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
}

.home-map-status-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.96rem;
    line-height: 1.45;
}

.app-content--map .auth-guard-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1200;
    transform: translate(-50%, -50%);
    width: min(90vw, 360px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid rgba(0, 188, 212, 0.34);
    border-radius: 8px;
    background: rgba(20, 24, 27, 0.96);
    color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 0 9999px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.app-content--map .auth-guard-loading .spinner-small {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 3px solid rgba(0, 188, 212, 0.16);
    border-top-color: #2196f3;
    border-right-color: #00bcd4;
    border-radius: 50%;
    animation: home-map-spin 0.85s linear infinite;
}

.app-content--map .auth-guard-loading span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

/* ========== LEAFLET MAP STYLES ========== */
.leaflet-map-container {
    height: 100%;
    width: 100%;
    background: #2d3748;
}

/* Remove Leaflet's default marker wrapper styling */
.leaflet-custom-marker {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

/* Ensure Leaflet markers are above tiles but below popups */
.leaflet-marker-pane {
    z-index: 600;
}

/* Style the Leaflet zoom control */
.leaflet-control-zoom {
    border: 1px solid rgba(0, 188, 212, 0.3) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: rgba(26, 32, 44, 0.95) !important;
    color: #00bcd4 !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(0, 188, 212, 0.15) !important;
    color: #00bcd4 !important;
}

.leaflet-control-zoom-in {
    border-bottom: 1px solid rgba(0, 188, 212, 0.2) !important;
}

/* Hide Leaflet attribution for cleaner look */
.leaflet-control-attribution {
    display: none !important;
}

/* Tile pane darkening transition */
.leaflet-tile-pane {
    transition: filter 0.3s ease;
}

/* ========== CUSTOM MARKER STYLES ========== */
.custom-marker {
    position: relative;
    width: calc(40px * var(--marker-scale, 1));
    height: calc(40px * var(--marker-scale, 1));
    min-width: calc(40px * var(--marker-scale, 1));
    min-height: calc(40px * var(--marker-scale, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    z-index: 500;
    overflow: visible;
}

.marker-visual {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    transform: scale(var(--marker-scale, 1));
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.marker-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    z-index: 2;
}

/* ========== SOC PROGRESS RING ========== */
.marker-soc-ring {
    position: absolute;
    inset: 0;
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
    transform-origin: center;
    pointer-events: none;
    overflow: visible;
    z-index: 3;
}

.marker-soc-ring-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.72);
    stroke-width: 5;
}

.marker-soc-ring-progress {
    fill: none;
    stroke: var(--marker-soc-color, #4caf50);
    stroke-width: 5;
    stroke-linecap: butt;
    transition: stroke-dasharray 0.3s ease, stroke 0.3s ease;
}

.marker-soc-ring.no-soc .marker-soc-ring-progress {
    display: none;
}

/* ========== MARKER STATUS COLORS ========== */
.marker-dot.error {
    background: #f44336;
    animation: pulse-error 2s infinite;
}

.marker-dot.warning {
    background: #ff9800;
}

.marker-dot.success {
    background: #4caf50;
}

/* ========== SOC TEXT ========== */
.marker-soc-text {
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
    line-height: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 4;
}

.marker-dot > i {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    line-height: 1 !important;
    position: relative;
    z-index: 2;
}

.marker-dot > i::before,
.marker-dot > i::after {
    line-height: 1 !important;
}

/* ========== MARKER EXPANDED CARD ========== */
.marker-expanded {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(33, 33, 33, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.custom-marker:hover .marker-expanded,
.custom-marker.active .marker-expanded,
.custom-marker.touch-active .marker-expanded {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-16px);
}

.custom-marker:hover .marker-dot,
.custom-marker.active .marker-dot,
.custom-marker.touch-active .marker-dot {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ========== MARKER INFO ========== */
.marker-site-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.marker-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.marker-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.marker-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.marker-stat-soc {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* ========== MARKER NAVIGATE BUTTON ========== */
.marker-navigate-btn {
    width: 100%;
    padding: 6px;
    background: rgba(0, 188, 212, 0.15);
    border: 1px solid rgba(0, 188, 212, 0.3);
    color: #00bcd4;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: block;
    font-family: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.marker-navigate-btn:hover {
    background: rgba(0, 188, 212, 0.25);
    border-color: #00bcd4;
    transform: translateY(-1px);
}

.marker-navigate-btn:active {
    background: rgba(0, 188, 212, 0.3);
    transform: translateY(0);
}

/* ========== ANIMATIONS ========== */
@keyframes pulse-error {
    0% { box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4); }
    50% { box-shadow: 0 2px 20px rgba(244, 67, 54, 0.8); }
    100% { box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4); }
}

@keyframes home-map-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== NO LOCATIONS OVERLAY ========== */
.no-locations-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem 3rem;
    border-radius: 0.5rem;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.no-locations-icon {
    color: #00bcd4;
    margin-bottom: 1rem;
}

.no-locations-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.add-site-btn {
    background: transparent;
    border: 1px solid #00bcd4;
    color: #00bcd4;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.add-site-btn:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: #00bcd4;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
    color: #00bcd4;
    text-decoration: none;
}

/* ========== SIDEBAR STYLES ========== */
.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 188, 212, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close-btn {
    background: transparent;
    border: 1px solid rgba(0, 188, 212, 0.3);
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: #00bcd4;
    color: #00bcd4;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ========== ORGANIZATION FILTER ========== */
.org-filter-section {
    margin-bottom: 1.5rem;
}

.filter-label {
    color: #00bcd4;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.org-filter-section .e-ddl.e-input-group {
    background: rgba(0, 188, 212, 0.05);
    border-color: rgba(0, 188, 212, 0.2);
}

.org-filter-section .e-ddl.e-input-group:hover {
    border-color: rgba(0, 188, 212, 0.3);
    background: rgba(0, 188, 212, 0.08);
}

.org-filter-section .e-ddl.e-input-group.e-input-focus {
    border-color: #00bcd4;
    background: rgba(0, 188, 212, 0.1);
    box-shadow: none;
}

.org-filter-section .e-ddl .e-input {
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
}

.org-filter-section .e-ddl .e-clear-icon {
    color: rgba(255, 255, 255, 0.5);
}

.org-filter-section .e-ddl .e-input-group-icon {
    color: rgba(0, 188, 212, 0.6);
}

/* ========== MAP SETTINGS SECTION ========== */
.map-settings-section {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 188, 212, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.map-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(0, 188, 212, 0.1);
}

.map-settings-header:hover {
    background: rgba(0, 188, 212, 0.08);
}

.map-settings-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #00bcd4;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-settings-icon {
    font-size: 1rem;
    color: #00bcd4;
}

.map-settings-chevron {
    font-size: 0.875rem;
    color: rgba(0, 188, 212, 0.6);
    transition: transform 0.3s ease;
}

.map-settings-chevron.expanded {
    transform: rotate(180deg);
}

.map-settings-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.map-settings-content.expanded {
    max-height: 500px;
}

.map-settings-inner {
    padding: 1rem;
}

/* ========== OVERLAY SLIDER ========== */
.overlay-slider-section {
    margin-bottom: 1.5rem;
    padding: 0;
}

.overlay-slider-section:last-child {
    margin-bottom: 0;
}

.slider-value-display {
    color: #00bcd4;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

.overlay-slider-section .lbsa-mud-slider {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
}

.overlay-slider-section .e-slider-container {
    margin-top: 0.75rem;
}

.overlay-slider-section .e-slider .e-handle {
    background: #00bcd4;
    border-color: #00bcd4;
}

.overlay-slider-section .e-slider .e-range {
    background: #00bcd4;
}

.overlay-slider-section .e-slider .e-scale {
    background: rgba(0, 188, 212, 0.2);
}

.overlay-slider-section .e-slider:hover .e-handle {
    background: #00acc1;
    border-color: #00acc1;
}

.map-switch-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
}

.map-switch-section .filter-label {
    margin-bottom: 0;
}

/* ========== FLOATING TOGGLE BUTTON ========== */
.floating-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00bcd4;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    appearance: none;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.floating-toggle-btn:hover {
    background: #00bcd4;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.5);
}

/* ========== SITES LIST ========== */
.sites-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 188, 212, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-item:hover {
    background: rgba(0, 188, 212, 0.08);
    border-color: rgba(0, 188, 212, 0.3);
}

.site-content {
    flex: 1;
    cursor: default;
}

.site-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.site-action-btn {
    background: transparent;
    border: 1px solid rgba(0, 188, 212, 0.3);
    color: rgba(255, 255, 255, 0.7);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.site-action-btn:hover {
    background: rgba(0, 188, 212, 0.15);
    border-color: #00bcd4;
    color: #00bcd4;
    transform: scale(1.1);
}

.site-action-btn.primary {
    background: rgba(0, 188, 212, 0.1);
    border-color: #00bcd4;
    color: #00bcd4;
}

.site-action-btn.primary:hover {
    background: rgba(0, 188, 212, 0.25);
}

/* ========== SITE STATUS BORDERS ========== */
.site-item.has-errors {
    border-left: 3px solid #f56565;
}

.site-item.has-warnings {
    border-left: 3px solid #f6ad55;
}

.site-item.all-good {
    border-left: 3px solid #48bb78;
}

.site-item.unassigned {
    border-left: 3px solid #6c757d;
    background: rgba(108, 117, 125, 0.05);
}

/* ========== SITE INFO ========== */
.site-name {
    color: #00bcd4;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.site-org {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.site-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    align-items: center;
}

.site-status {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.status-error {
    color: #f56565;
}

.status-warning {
    color: #f6ad55;
}

.status-good {
    color: #48bb78;
}

/* ========== DEVICE STATUS DISPLAY ========== */
.device-status-display {
    display: inline-flex;
    align-items: center;
}

.device-status-display .devices-offline {
    color: #f44336;
    font-weight: 500;
}

.device-status-display .devices-partial {
    color: #ff9800;
    font-weight: 500;
}

/* ========== BATTERY STATUS BREAKDOWN ========== */
.battery-status-breakdown {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 188, 212, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(0, 188, 212, 0.1);
}

.battery-status-breakdown span {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
}

.battery-status-breakdown .battery-total {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    padding-right: 0.5rem;
    border-right: 1px solid rgba(0, 188, 212, 0.2);
}

.battery-status-breakdown .battery-online {
    color: #4caf50;
}

.battery-status-breakdown .battery-online i {
    color: #4caf50;
    font-size: 0.6rem;
}

.battery-status-breakdown .battery-off {
    color: #ff9800;
}

.battery-status-breakdown .battery-off i {
    color: #ff9800;
    font-size: 0.6rem;
}

.battery-status-breakdown .battery-offline {
    color: #f44336;
}

.battery-status-breakdown .battery-offline i {
    color: #f44336;
    font-size: 0.6rem;
}

.battery-status-breakdown .zero-count {
    opacity: 0.4;
}

.battery-status-breakdown .zero-count i {
    opacity: 0.6;
}

/* ========== COMPACT BATTERY STATUS ========== */
.marker-battery-status {
    margin: 8px 0;
    text-align: center;
}

.battery-status-breakdown.compact {
    padding: 0.15rem 0.3rem;
    gap: 0.5rem;
    font-size: 0.7rem;
    background: rgba(0, 188, 212, 0.08);
    border: 1px solid rgba(0, 188, 212, 0.15);
}

.battery-status-breakdown.compact span {
    font-size: 0.7rem;
}

.battery-status-breakdown.compact i {
    font-size: 0.5rem;
    margin-right: 0.2rem;
}

.battery-status-breakdown.compact .battery-total {
    padding-right: 0.3rem;
    font-weight: 600;
}

.battery-status-breakdown.compact .battery-online i,
.battery-status-breakdown.compact .battery-off i,
.battery-status-breakdown.compact .battery-offline i {
    font-size: 0.5rem;
}

/* ========== SCROLLBAR ========== */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(0, 188, 212, 0.05);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.2);
    border-radius: 3px;
}

/* ========== MAP SIDEBAR ========== */
.home-map-sidebar.lbsa-sidebar-panel,
.home-map-sidebar.e-sidebar {
    background: rgba(26, 32, 44, 0.98);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(0, 188, 212, 0.2);
    color: rgba(255, 255, 255, 0.9);
    z-index: 1100 !important;
    display: flex;
    flex-direction: column;
}

.home-map-sidebar.lbsa-sidebar-panel {
    overflow: hidden;
}

/* ========== ALERT STATUS BAR ========== */
.alert-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(244, 67, 54, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 50px 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease;
}

.alert-status-bar.warning {
    background: rgba(255, 152, 0, 0.95);
}

.alert-status-bar:hover {
    background: rgba(244, 67, 54, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.alert-status-bar.warning:hover {
    background: rgba(255, 152, 0, 1);
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-message {
    font-size: 12px;
    opacity: 0.9;
}

.alert-dismiss-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.alert-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ========== MOBILE TOUCH STYLES ========== */
@media (pointer: coarse) {
    .custom-marker {
        width: calc(40px * var(--marker-scale, 1));
        height: calc(40px * var(--marker-scale, 1));
        min-width: calc(40px * var(--marker-scale, 1));
        min-height: calc(40px * var(--marker-scale, 1));
    }

    .marker-expanded {
        min-width: 220px;
    }

    /* Disable hover effects on touch devices */
    .custom-marker:hover .marker-expanded {
        opacity: 0;
        visibility: hidden;
    }

    .custom-marker:hover .marker-dot {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    /* Only show tooltip when explicitly activated via touch */
    .custom-marker.touch-active .marker-expanded,
    .custom-marker.active .marker-expanded {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-16px);
    }

    .custom-marker.touch-active .marker-dot,
    .custom-marker.active .marker-dot {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 768px) {
    .home-map-status-card {
        flex-direction: column;
        text-align: center;
        min-height: 190px;
        padding: 1.35rem;
    }

    .marker-dot {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .marker-expanded {
        min-width: 240px;
        font-size: 13px;
        padding: 14px;
    }

    .marker-navigate-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* ========== HIGH PRECISION POINTER ========== */
@media (pointer: fine) {
    .custom-marker:hover .marker-expanded {
        opacity: 1;
        visibility: visible;
    }
}
