/* Enterprise Map-Centric GIS Theme Styling (100% LIGHT THEME CONSISTENT) */

body {
    background-color: #f8fafc; /* Slate 50 */
    font-family: 'Inter', 'Sarabun', sans-serif;
    color: #0f172a; /* Slate 900 */
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Log Container Scrollbar (Light Enterprise) */
#log-container::-webkit-scrollbar-track {
    background: #f8fafc;
}

#log-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

#log-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Charging Glow Animation */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.15;
        box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.2);
    }
    50% {
        opacity: 0.45;
        box-shadow: inset 0 0 30px rgba(16, 185, 129, 0.4);
    }
}

.charging-glow {
    animation: pulse-glow 2s infinite ease-in-out;
    opacity: 1 !important;
}

/* Log Item Styling (Enterprise Light Theme) */
.log-item {
    transition: all 0.2s ease;
    border-left-width: 4px;
}

.log-item:hover {
    background-color: #f1f5f9 !important;
}

.log-direction-in {
    border-left-color: #059669; /* Emerald 600 */
}

.log-direction-out {
    border-left-color: #2563eb; /* Blue 600 */
}

/* Leaflet Container & Markers */
.leaflet-container {
    background: #f8fafc !important;
    font-family: inherit;
}

.leaflet-bar a {
    background-color: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.leaflet-bar a:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15) !important;
    border-radius: 8px !important;
}

/* MarkerCluster Custom Enterprise Styling (การแสดงผลรวบหมุดสถานีเมื่อ Zoom Out) */
.marker-cluster-small {
    background-color: rgba(37, 99, 235, 0.2) !important;
}
.marker-cluster-small div {
    background-color: rgba(37, 99, 235, 0.95) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-family: 'Inter', 'Sarabun', sans-serif !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.marker-cluster-medium {
    background-color: rgba(16, 185, 129, 0.2) !important;
}
.marker-cluster-medium div {
    background-color: rgba(16, 185, 129, 0.95) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-family: 'Inter', 'Sarabun', sans-serif !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.marker-cluster-large {
    background-color: rgba(239, 68, 68, 0.2) !important;
}
.marker-cluster-large div {
    background-color: rgba(239, 68, 68, 0.95) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-family: 'Inter', 'Sarabun', sans-serif !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

/* Status Pill Colors */
.status-pill-available {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-pill-preparing {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-pill-charging {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-pill-finishing {
    background-color: #faf5ff;
    color: #6d28d9;
    border: 1px solid #e9d5ff;
}

.status-pill-faulted {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-pill-unavailable {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Station Card Highlighting */
.station-card {
    transition: all 0.2s ease-in-out;
}

.station-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.station-card-active {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.08) !important;
}

/* 100% SOLID OPAQUE LEAFLET TOOLTIP & POPUP (NO TRANSPARENCY) */
.leaflet-tooltip {
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.custom-leaflet-tooltip {
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    display: none !important;
}
