

.erddap-ranges label {
    display: block;
}

.erddap-url-preview {
    display: none !important;
}

/* Two-column layout for ERDDAP UI */
.erddap-ui-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.erddap-col {
    box-sizing: border-box;
}

.erddap-col--controls {
    flex: 0 0 30%;
    max-width: 30%;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

.erddap-col--map {
    flex: 1 1 70%;
    max-width: 70%;
}

/* Make controls stack above map on narrow screens */
@media (max-width: 800px) {
    .erddap-ui-row {
        flex-direction: column;
    }
    .erddap-col--controls,
    .erddap-col--map {
        max-width: 100%;
        flex: 1 1 100%;
        width: 100% !important;
        min-width: 0; /* allow flex children to shrink correctly */
    }
}

/* Small polish for form elements inside controls */
.erddap-vars label,
.erddap-ranges label {
    display: block;
    margin-bottom: 8px;
}
.erddap-vars select,
.erddap-vars input[type="number"],
.erddap-vars input[type="date"] {
    width: 100%;
    box-sizing: border-box;
}

.erddap-actions .button {
    white-space: nowrap;
}

/* Defensive: ensure map wrapper and map remain visible and sized
   in case a theme or other CSS targets generic selectors */
.erddap-map-wrapper,
.erddap-map {
    display: block !important;
    visibility: visible !important;
}

/* Ensure map column and wrapper take full width when stacked */
@media (max-width: 800px) {
    .erddap-col--map,
    .erddap-map-wrapper {
        width: 100% !important;
        min-width: 100px !important; /* fallback to prevent zero-width */
    }
}

/* Give the map a sensible min height on narrow screens */
@media (max-width: 800px) {
    .erddap-map {
        min-height: 240px !important;
        height: auto !important;
    }
}