/* ================================================
   Map Monitoring Page Styles
   ================================================ */

/* Suppress Leaflet Default Tooltip Style */
.leaflet-tooltip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Field Zone Label Tooltip */
.field-zone-label {
    background: rgba(17, 24, 39, 0.95) !important; /* Deeper dark */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px);
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Remove default Leaflet tooltip arrow/tip */
.field-zone-label::before {
    display: none !important;
}

/* Inner label layout */
.field-zone-label .field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Colored dot next to the name */
.field-zone-label .field-label-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 4px currentColor;
}

/* Map Layer Control Styling */
.leaflet-control-layers {
    background: #111827 !important;
    border: 1px solid #374151 !important;
    color: #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}
.leaflet-control-layers-expanded {
    padding: 10px !important;
}
.leaflet-control-layers-base label {
    margin-bottom: 5px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.leaflet-control-layers-base label:hover {
    background: rgba(16, 185, 129, 0.1);
}
.leaflet-control-layers-selector {
    accent-color: #10b981;
    margin-right: 8px !important;
}

/* Custom Popup Styling to prevent cutoff */
.custom-popup .leaflet-popup-content {
    margin: 12px !important;
    line-height: inherit !important;
    width: auto !important;
    min-width: 200px;
}

.custom-popup .leaflet-popup-content-wrapper {
    padding: 1px;
    overflow: hidden;
}

.field-popup .leaflet-popup-content {
    margin: 8px !important;
    min-width: 120px;
}

/* Hide field labels when class is present */
.hide-labels .field-zone-label {
    display: none !important;
}

/* Toggle Switch Styles */
.dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0); /* Default position */
}
input:checked ~ .bg-gray-600 {
    background-color: #10b981 !important; /* Green when checked */
}
input:checked ~ .dot {
    transform: translateX(1.25rem); /* Move right when checked */
}

/* Ensure button text in Leaflet popup is white (overriding default Leaflet link color) */
.leaflet-popup-content a {
    color: #ffffff !important;
}
