/* Bright Glassmorphism utility inspired by HeroUI */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Map container default */
#map {
    background: #f8fafc;
}

/* MapLibre popup styling (match previous glass look) */
.maplibregl-popup-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
    border-radius: 16px;
    color: #1f2937;
    padding: 0 !important;
    overflow: hidden;
}
.maplibregl-popup-content > div {
    /* keep space so the X button doesn't overlap content */
    padding-right: 34px;
}
.maplibregl-popup-close-button {
    font-size: 22px;
    color: #4b5563;
    padding: 10px;
    line-height: 1;
    transition: color 0.2s;
}
.maplibregl-popup-close-button:hover {
    color: #111827;
}
.maplibregl-popup-tip {
    border-top-color: rgba(255, 255, 255, 0.85) !important;
}

/* Custom Dropdown Styling */
.glass-select {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-select option {
    background-color: rgba(255, 255, 255, 0.95);
    color: #374151;
    font-weight: 600;
    padding: 10px;
}

/* Glassy Leaflet Layer Control */
.maplibre-control {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    padding: 12px !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

/* Basemap control (simple radio group) */
.basemap-control {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 10px 12px;
}
.basemap-control label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    color: #374151;
    margin: 6px 0;
    user-select: none;
}
.basemap-control input[type="radio"] {
    accent-color: #2563eb;
}

/* MapLibre Attribution + controls subtle theming */
.maplibregl-ctrl-attrib {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
}
.maplibregl-ctrl-group {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

/* Debug overlay */
.debug-overlay-panel {
    background: rgba(17, 24, 39, 0.88);
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 40vh;
    overflow: auto;
}

/* Selected crop chips (below filter) */
.crop-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #374151;
    font-weight: 800;
    font-size: 11px;
}
.crop-chip button {
    color: #2563eb;
    font-weight: 900;
    line-height: 1;
}
