body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html,
body,
#map {
    height: 100%;
}

#colormap-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    width: 210px;
    padding: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    line-height: 1.4;
}

#colormap-controls h1 {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.2;
}

#colormap-controls h1 label {
    display: block;
}

#colormap-controls input,
#colormap-controls select,
#colormap-controls button {
    font: inherit;
}

#colormap-controls label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

#colormap-controls input[type='range'] {
    display: block;
    width: 100%;
    margin: 0 0 10px;
}

#basemap-style {
    width: 100%;
    margin: 2px 0 10px;
    padding: 7px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: white;
}

#colormap-controls .control-button {
    display: block;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    margin: 0 0 10px;
    padding: 7px;
    border: 1px solid #aaa;
    border-radius: 4px;
    color: #000;
    background: #f6f6f6;
    cursor: pointer;
    text-align: center;
    touch-action: manipulation;
    user-select: none;
}

#colormap-controls .control-button:hover,
#colormap-controls .control-button:focus-visible {
    background: #e8e8e8;
}

#sidebar-toggle:checked ~ #controls-content {
    display: none;
}

#sidebar-toggle:checked ~ h1 {
    margin-bottom: 0;
    cursor: pointer;
}

#layer-controls {
    margin: 2px 0 10px;
    padding: 8px 0 2px;
    border: 0;
    border-top: 1px solid #ccc;
}

#layer-controls legend {
    padding: 0 8px 0 0;
    font-weight: 700;
}

#layer-controls .layer-toggle {
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

#layer-controls input {
    margin: 0;
}

#map-status {
    padding-top: 8px;
    border-top: 1px solid #ccc;
}

.page-link {
    display: block;
    margin-top: 12px;
    padding: 8px;
    border-radius: 6px;
    color: #fff;
    background: #49006a;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.page-link + .page-link {
    margin-top: 8px;
}

.page-link:hover,
.page-link:focus-visible {
    background: #65077b;
}

#colormap-controls .bmc-btn-container {
    margin-top: 8px;
}

#colormap-controls .bmc-btn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    justify-content: center;
    padding: 8px !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

#colormap-controls .bmc-btn svg {
    width: 16px;
    height: 16px !important;
}

#colormap-controls .bmc-btn-text {
    width: auto;
    margin-left: 6px;
    flex-shrink: 1;
    font-family: inherit !important;
    line-height: 1.4;
    text-align: center;
}
