/* =========================
   mapper.map.css
   ========================= */
/* Photon geocoder panel */
#mapper-geocode-panel {
    position: absolute;
    left: 3.25rem;
    top: 0.75rem;
    z-index: 45;
    max-width: min(380px, 42vw);
}

/* Match rounded input-group appearance */
.mapper-geocode-bar .form-control {
    border-radius: 0.75rem;
}

.mapper-geocode-bar .input-group-text {
    border-radius: 0.75rem 0 0 0.75rem;
}

.mapper-geocode-bar .btn,
.mapper-geocode-bar .mapper-geocode-clear-btn {
    border-radius: 0 0.75rem 0.75rem 0;
}

.mapper-geocode-clear-btn {
    background: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
}

.mapper-geocode-clear-btn i,
.mapper-geocode-clear-btn .bi {
    color: #6c757d;
}

.mapper-geocode-clear-btn:hover,
.mapper-geocode-clear-btn:focus {
    background: #e9ecef;
}

.mapper-geocode-clear-btn:focus {
    box-shadow: none;
}

/* Results dropdown */
.mapper-geocode-results {
    margin-top: 0.25rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.mapper-geocode-results .list-group-item {
    cursor: pointer;
}

.mapper-geocode-results .list-group-item:hover {
    background: var(--bs-light);
}

/* Prevent overlap: push Area Search panel below geocoder when it is shown */
#find-panel {
    top: 0.5rem;
    left: 0.5rem;
}

/* Mobile: match your existing pattern (panels become static blocks) */
@media (max-width: 991.98px) {
    #mapper-geocode-panel {
        position: static;
        left: auto;
        top: auto;
        margin: 0.75rem;
        max-width: none;
    }

    #find-panel {
        top: auto;
    }
}



/* Map tab layout */
#location-pane,
#timeframe-pane,
#mapper-pane,
#export-pane {
    display: none !important;
}

#location-pane.active,
#timeframe-pane.active,
#export-pane.active {
    display: block !important;
}

#mapper-pane.active {
    display: block !important;
}

.mapper-pane-layout-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.mapper-pane-layout-toggle {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 31, 31, 0.2);
    border-radius: 0.45rem;
    background: #fff;
    color: #1f1f1f;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.mapper-pane-layout-toggle:hover,
.mapper-pane-layout-toggle:focus-visible {
    background: rgba(31, 166, 103, 0.14);
    border-color: rgba(31, 166, 103, 0.72);
    color: #1f1f1f;
}

.mapper-pane-layout-toggle:focus-visible {
    outline: 2px solid rgba(31, 166, 103, 0.42);
    outline-offset: 2px;
}

.mapper-pane-layout-toggle img {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
}

.mapper-pane-layout-toggle[data-layout-state="auto-active"] {
    background: rgba(31, 166, 103, 0.05);
    border-color: rgba(31, 166, 103, 0.5);
}

.mapper-pane-layout-toggle[data-layout-state="auto-active"]:hover,
.mapper-pane-layout-toggle[data-layout-state="auto-active"]:focus-visible {
    background: rgba(31, 166, 103, 0.05);
    border-color: rgba(31, 166, 103, 0.5);
}

.mapper-pane-layout-toggle[data-layout-state="manual-active"] {
    background: rgba(31, 166, 103, 0.46);
    border-color: rgba(31, 166, 103, 0.86);
}

.mapper-pane-layout-toggle[data-layout-state="manual-active"]:hover,
.mapper-pane-layout-toggle[data-layout-state="manual-active"]:focus-visible {
    background: rgba(31, 166, 103, 0.46);
    border-color: rgba(31, 166, 103, 0.86);
}

/* Shared split proportions keep the map and results pane shrinking together across auto and forced side-by-side layouts. */
#mapper-pane.active[data-layout-override="split"] {
    display: grid !important;
    grid-template-columns: minmax(0, 5fr) minmax(220px, 3fr);
    gap: 1rem;
    align-items: start;
    width: calc(100vw - 4rem);
    max-width: calc(100vw - 4rem);
    margin-left: calc(50% - 50vw + 1rem);
    margin-right: calc(50% - 50vw + 1rem);
}

#mapper-pane.active[data-layout-override="split"] > .mapper-info-card {
    grid-column: 1 / -1;
    margin-bottom: -0.325rem;
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-main {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    width: 100%;
    max-width: none;
    min-width: 0;
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-main .mapper-map-wrap {
    height: 76vh;
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-side {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    width: 100%;
    max-width: none;
    height: 800px;
    max-height: 800px;
    min-width: 0;
    min-height: 0;
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-side > .mapper-results.mt-3 {
    margin-top: 0 !important;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-side .map-selected-wrap {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-side .map-selected-wrap .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-inline-end: calc(var(--bs-card-spacer-x, 1rem) + 0.5rem);
}

#mapper-pane.active[data-layout-override="split"] > .mapper-pane-layout-controls {
    grid-column: 2;
    grid-row: 3;
    justify-self: stretch;
    margin-top: -0.7rem;
    margin-bottom: 0;
}

.mapper-map-tools-card {
    background: #f3f4f6;
    border: 1px solid #d9dee3;
}

.mapper-map-tools-card > .card-body {
    padding: 0.85rem;
}

.mapper-map-tools-card .mapper-toolbar.mt-3 {
    margin-top: 0 !important;
}

@media (min-width: 1675px) {
    #mapper-pane.active:not([data-layout-override="stacked"]) {
        display: grid !important;
        grid-template-columns: minmax(0, 5fr) minmax(220px, 3fr);
        gap: 1rem;
        align-items: start;
        width: calc(100vw - 4rem);
        max-width: calc(100vw - 4rem);
        margin-left: calc(50% - 50vw + 1rem);
        margin-right: calc(50% - 50vw + 1rem);
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-info-card {
        grid-column: 1 / -1;
        margin-bottom: -0.325rem;
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-main {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-main .mapper-map-wrap {
        height: 76vh;
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-side {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        width: 100%;
        max-width: none;
        height: 800px;
        max-height: 800px;
        min-width: 0;
        min-height: 0;
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-side > .mapper-results.mt-3 {
        margin-top: 0 !important;
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-side .map-selected-wrap {
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-side .map-selected-wrap .card-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        padding-inline-end: calc(var(--bs-card-spacer-x, 1rem) + 0.5rem);
    }

    #mapper-pane.active:not([data-layout-override="stacked"]) > .mapper-pane-layout-controls {
        grid-column: 2;
        grid-row: 3;
        justify-self: stretch;
        margin-top: -0.7rem;
        margin-bottom: 0;
    }
}

.mapper-pane-main {
    container-type: inline-size;
}

.mapper-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.mapper-toolbar-group {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
    flex: 1 1 420px;
    flex-wrap: wrap;
}

.mapper-toolbar-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    max-width: 120px;
    background-color: #fff;
    border-color: #373737;
    color: #1f1f1f;
    opacity: 0.88;
    outline: 1px solid rgba(31, 31, 31, 0.35);
    outline-offset: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.mapper-toolbar-group .btn:hover,
.mapper-toolbar-group .btn:focus-visible {
    background-color: #154a19;
    border-color: #154a19;
    color: #fff;
    opacity: 0.95;
    outline-color: rgba(255, 255, 255, 0.75);
}

.mapper-toolbar-group .btn:focus:not(:focus-visible) {
    background-color: #fff;
    border-color: #373737;
    color: #1f1f1f;
    opacity: 0.88;
    outline-color: rgba(31, 31, 31, 0.35);
}

.mapper-toolbar-group .btn .mapper-toolbar-group-label {
    display: inline;
}

@container (max-width: 980px) {
    .mapper-toolbar-group {
        min-width: 0;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .mapper-toolbar-group .btn {
        min-width: 0;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }
}

@container (max-width: 860px) {
    .mapper-toolbar {
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .mapper-toolbar > .btn {
        width: auto;
        min-width: 40px;
        max-width: 40px;
        flex: 0 0 40px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mapper-toolbar > .btn .mapper-toolbar-btn-label {
        display: none;
    }

    .mapper-toolbar > .btn i {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .mapper-toolbar-group {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: center;
        gap: 0.35rem;
    }

    .mapper-toolbar-group .btn {
        min-width: 0;
    }
}

@container (max-width: 600px) {
    .mapper-toolbar-group .btn {
        width: 2.5rem;
        min-width: 2.5rem;
        max-width: 2.5rem;
        flex: 0 0 2.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .mapper-toolbar-group .btn .mapper-toolbar-group-label {
        display: none;
    }

    .mapper-toolbar-group .btn i {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

#btn-map-navigate.active,
#btn-map-navigate.active:hover,
#btn-map-navigate.active:focus,
#btn-map-select.active,
#btn-map-select.active:hover,
#btn-map-select.active:focus,
#btn-map-box-select.active,
#btn-map-box-select.active:hover,
#btn-map-box-select.active:focus {
    background-color: #1b5e20;
    border-color: #1b5e20;
    color: #ffea00;
    opacity: 0.95;
    outline-color: rgba(255, 234, 0, 0.85);
}


.mapper-map-wrap {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 520px;
    border: 1px solid rgba(31, 31, 31);
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    --mapper-dock-w: 320px;
    --mapper-legend-w: 280px;
    --mapper-panel-pad: 0;
    --mapper-panel-gap: .5rem;
}

/* Responsive: keep the map dock compact on narrower screens */
@media (max-width: 992px) {
    .mapper-map-wrap {
        --mapper-dock-w: 100%;
        --mapper-legend-w: calc(100% - 1.5rem);
    }
}

.mapper-map {
    position: absolute;
    inset: 0;
}

/* Loading overlay */
.mapper-map-loading {
    position: absolute;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
}

.mapper-map-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--bs-border-color);
    background: rgba(255, 255, 255, 0.95);
    border-radius: .5rem;
}



/* Identify dropdown swatches */
.identify-line-swatch {
    width: 46px;
    height: 0;
    border-top-style: solid;
    border-top-width: 2px;
    display: inline-block;
    margin-right: .5rem;
    vertical-align: middle;
}

.identify-box-swatch {
    width: 46px;
    height: 12px;
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    display: inline-block;
    margin-right: .5rem;
    vertical-align: middle;
    box-sizing: border-box;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: 0 0;
}

.mapper-identify-pop {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: .5rem;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, 0.12);
    max-width: 280px;
    z-index: 1062;
}

.mapper-identify-pop-inner {
    padding: .5rem .75rem .75rem .75rem;
    position: relative;
}

.mapper-identify-pop.mapper-identify-pop-raster {
    max-width: calc(100vw - 1.5rem);
}

.mapper-identify-pop.mapper-identify-pop-raster .mapper-identify-pop-inner {
    padding: .7rem .95rem .9rem .95rem;
}

.mapper-identify-close {
    position: absolute;
    top: .35rem;
    right: .35rem;
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: #fff;
    border-radius: .25rem;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.mapper-identify-content {
    font-size: .88rem;
    max-height: none;
    overflow: visible;
    padding-top: .1rem;
}

.mapper-identify-pop.mapper-identify-pop-boundary {
    max-width: 300px;
    width: 300px;
    height: 300px;
    overflow: hidden;
}

.mapper-identify-pop.mapper-identify-pop-boundary .mapper-identify-pop-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.mapper-identify-pop.mapper-identify-pop-boundary .mapper-identify-content {
    flex: 1 1 auto;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding-right: .1rem;
}

.mapper-identify-pop.mapper-identify-pop-boundary .mapper-identify-close {
    position: absolute;
    top: .35rem;
    right: .35rem;
    z-index: 4;
}

.mapper-identify-detail-head {
    background: rgba(255, 255, 255, 0.98);
}

.mapper-identify-pop.mapper-identify-pop-boundary .mapper-identify-detail-head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-right: 1.9rem;
    padding-top: .05rem;
    padding-bottom: .35rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mapper-identify-pop.mapper-identify-pop-boundary .mapper-identify-detail-head .mapper-identify-detail-meta {
    margin-bottom: 0;
}

.mapper-identify-detail-title {
    font-weight: 700;
    padding-right: 1.75rem;
    line-height: 1.25;
}

.mapper-identify-value-title {
    font-weight: 700;
    padding-right: 1.75rem;
    line-height: 1.25;
    margin-bottom: .3rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mapper-identify-detail-meta {
    font-size: .72rem;
    color: rgba(0, 0, 0, 0.6);
    margin: .2rem 0 .55rem 0;
}

.mapper-identify-sections {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    width: 100%;
}

.mapper-identify-section {
    display: block;
    border: 1px solid var(--bs-border-color);
    border-radius: .4rem;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

.mapper-identify-section-toggle {
    width: 100%;
    border: 0;
    background: #f5f6f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem .6rem;
    font-weight: 700;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
}

.mapper-identify-section-toggle > span {
    flex: 1 1 auto;
}

.mapper-identify-section-toggle:hover {
    background: #eceff2;
}

.mapper-identify-section-toggle i {
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.mapper-identify-section.is-collapsed .mapper-identify-section-body {
    display: none;
}

.mapper-identify-table {
    width: 100%;
    border-collapse: collapse;
}

.mapper-identify-table th,
.mapper-identify-table td {
    padding: .35rem .55rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: top;
}

.mapper-identify-table thead th {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: rgba(0, 0, 0, 0.6);
    background: #fbfbfc;
    white-space: pre-line;
}

.mapper-identify-table th:last-child,
.mapper-identify-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.mapper-identify-table .map-delta {
    margin-left: 0;
}

.mapper-identify-subhead td {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.62);
    background: rgba(31, 166, 103, 0.05);
}

/* Identify button colors */
#btn-identify-run {
    background-color: #fff;
    border-color: #373737;
    color: #1f1f1f;
    font-size: 0.84rem;
    opacity: 0.88;
    outline: 3px solid rgba(31, 166, 103, 0.7);
    line-height: 1.1;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
}

#btn-identify-run.identify-enabled {
    background-color: #1b5e20;
    border: 1px solid #1b5e20;
    color: #ffea00;
}

#btn-identify-run:disabled {
    opacity: 0.55;
}

.mapper-identify-help {
    margin-bottom: 0.4rem;
}

/* Cursor icon overlay shown while Identify is enabled */
.mapper-identify-cursor {
    position: absolute;
    z-index: 1060;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
    pointer-events: none;
    user-select: none;
}

.mapper-identify-cursor i {
    font-size: 0.78rem;
    line-height: 1;
}

/* Box-select glyph reads slightly high/left by default; nudge to visual center. */
.mapper-identify-cursor.is-box i {
    transform: translate(1px, 1px);
}

.mapper-tempbox {
    position: absolute;
    left: .75rem;
    bottom: .75rem;
    z-index: 1042;
    width: 200px;
    max-width: 45vw;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    box-shadow: 0 .5rem 1.35rem rgba(0, 0, 0, 0.6);
    padding: .7rem .75rem .55rem .75rem;
    text-align: center;
}

.mapper-tempbox-title {
    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.2;
    margin-bottom: .2rem;
}

.mapper-tempbox-subtitle {
    font-size: .85rem;
    color: #4b4b4b;
    line-height: 1.2;
    margin-bottom: .45rem;
}

.mapper-tempbox-bar {
    height: 18px;
    width: 160px;
    border-radius: 0;
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    background: #eee;
    box-sizing: border-box;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: 0 0;
    margin: 0 auto;
}

.mapper-tempbox-ticks {
    position: relative;
    width: 160px;
    height: 28px;
    margin-top: .35rem;
    margin-left: auto;
    margin-right: auto;
}

.mapper-tempbox-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    width: 52px;
}

.mapper-tempbox-tick-line {
    width: 0;
    height: 7px;
    border-left: 1px solid rgba(0, 0, 0, 0.55);
    margin: 0 auto;
}

.mapper-tempbox-tick-label {
    font-size: .75rem;
    color: rgba(0, 0, 0, 0.75);
    margin-top: 2px;
    white-space: nowrap;
}

/* Expanded widget */
.mapper-identify-widget {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1047;
    --mapper-identify-close-offset: calc(100% - 4px);

    width: 300px;
    max-width: 100%;

    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: 0;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    isolation: isolate;

    padding: 10px 10px 10px 10px;
}

.mapper-identify-widget:not(.is-collapsed) {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.mapper-identify-widget:not(.is-collapsed)::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    z-index: 2;
    pointer-events: none;
}

.mapper-identify-title {
    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 1.08rem;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-right: 28px;
    margin-bottom: 8px;
}

.mapper-identify-toggle {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 36px;
    height: 36px;
    border-radius: 5px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 .2rem .55rem rgba(0, 0, 0, 0.18);
}

.mapper-identify-toggle:hover,
.mapper-identify-toggle:focus {
    background: rgba(0, 0, 0, 0.62);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.mapper-identify-toggle:focus {
    outline: none;
}

.mapper-identify-toggle-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mapper-identify-toggle-search {
    font-size: .95rem;
}

.mapper-identify-toggle-close {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Collapsed: only show the i button in the corner */
.mapper-identify-widget.is-collapsed {
    width: auto;
    max-width: none;

    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.mapper-identify-widget.is-collapsed .mapper-identify-body {
    display: none;
}

.mapper-identify-widget .mapper-identify-body {
    position: relative;
    z-index: 3;
}

.mapper-identify-widget.is-collapsed .mapper-identify-toggle {
    position: static;
    border-radius: 0;
}

.mapper-identify-widget.is-collapsed .mapper-identify-toggle-close {
    display: none;
}

.mapper-identify-widget.is-collapsed .mapper-identify-toggle-search {
    display: inline-flex;
}

.mapper-identify-widget:not(.is-collapsed) .mapper-identify-toggle {
    right: var(--mapper-identify-close-offset);
    top: 8px;
    z-index: 1 !important;
}

.mapper-identify-widget:not(.is-collapsed) .mapper-identify-toggle-close {
    display: inline-flex;
}

.mapper-identify-widget:not(.is-collapsed) .mapper-identify-toggle-search {
    display: none;
}

.mapper-identify-select-dropdown {
    width: 100%;
    font-size: 0.84rem;
}

.mapper-identify-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    background: #fff;
    border-color: rgba(108, 117, 125, 0.45);
    color: #111;
}

.mapper-identify-select-btn:hover,
.mapper-identify-select-btn.mapper-identify-select-button:hover {
    color: #111 !important;
    background: #eceff1;
    border-color: #c8ccd1;
}

.mapper-identify-select-btn:focus,
.mapper-identify-select-btn.mapper-identify-select-button:focus,
.show > .mapper-identify-select-btn.dropdown-toggle:focus,
.show > .mapper-identify-select-button.dropdown-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 .15rem rgba(27, 94, 32, 0.18);
    color: #111 !important;
    background: #eceff1;
    border-color: #c8ccd1;
}

.mapper-identify-select-btn:active,
.mapper-identify-select-btn.mapper-identify-select-button:active,
.show > .mapper-identify-select-btn.dropdown-toggle,
.show > .mapper-identify-select-button.dropdown-toggle {
    color: #111 !important;
    background: #eceff1;
    border-color: #c8ccd1;
    box-shadow: none;
}

.mapper-identify-select-value {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: .45rem;
    color: inherit;
}

.mapper-identify-select-btn .mapper-identify-select-label {
    color: inherit;
}

.mapper-identify-select-value.is-placeholder .mapper-identify-select-label {
    color: rgba(0, 0, 0, 0.56);
}

.mapper-identify-select-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mapper-identify-select-menu {
    left: auto;
    right: 0;
    min-width: 100%;
    width: min(260px, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.82rem;
}

.mapper-identify-select-menu .dropdown-header {
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.58);
    padding: .35rem .6rem .2rem .6rem;
}

.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item {
    border: 1px solid transparent;
    border-radius: .35rem;
    padding: .32rem .48rem;
    color: #212529;
}

.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item:hover,
.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item:focus {
    background: #eceff1;
    color: #111 !important;
    border-color: #c8ccd1;
}

.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item.active,
.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item:active {
    background: #eceff1;
    color: #111 !important;
    border-color: #c8ccd1;
}

.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item.mapper-identify-select-item-default .mapper-identify-select-label {
    color: rgba(0, 0, 0, 0.56);
}

.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item.mapper-identify-select-item-default.active .mapper-identify-select-label,
.mapper-identify-select-menu .dropdown-item.mapper-identify-select-item.mapper-identify-select-item-default:active .mapper-identify-select-label {
    color: rgba(0, 0, 0, 0.56) !important;
}

.mapper-identify-select-item-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
}

.mapper-identify-select-menu .mapper-identify-select-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
}



/* Mapper selection tables (ported from Heat Trends) */

/* Delta badge (optional: used for 2050s-2010s change chips) */
.map-delta {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.35rem;
    border-radius: 0.35rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.map-delta.chg-zero {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.12);
}

.map-delta.chg-neg {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
}

.map-delta.chg-pos1 {
    color: #5c4b00;
    background: rgba(255, 243, 181, 0.90);
}

.map-delta.chg-pos2 {
    color: #6a4a00;
    background: rgba(255, 220, 122, 0.82);
}

.map-delta.chg-pos3 {
    color: #8b4a00;
    background: rgba(255, 183, 103, 0.72);
}

.map-delta.chg-pos4 {
    color: #9a3f00;
    background: rgba(255, 145, 80, 0.64);
}

.map-delta.chg-pos5 {
    color: #9d1d1d;
    background: rgba(243, 94, 94, 0.58);
}

.map-delta.chg-pos6 {
    color: #8a121a;
    background: rgba(221, 64, 64, 0.54);
}

.map-delta.chg-pos7 {
    color: #5d0c16;
    background: rgba(155, 39, 56, 0.44);
}

.map-delta.chg-pos8 {
    color: #3f0729;
    background: rgba(95, 30, 78, 0.34);
}

.map-delta.chg-text-black {
    color: #000 !important;
}

/* Heat table */
.map-heat-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.map-heat-table th,
.map-heat-table td {
    box-sizing: border-box;
    border: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    vertical-align: middle;
    padding: 0.3rem 0.5rem;
}

.map-heat-table thead tr:first-child th,
.map-heat-table tr > :first-child {
    border-left: 1px solid #d0d0d0;
}

.map-heat-table thead tr:first-child th {
    border-top: 1px solid #d0d0d0;
}

.map-heat-table thead th {
    text-align: center;
    background: #f8f9fa;
}

.map-heat-table tbody td {
    text-align: center;
}

.map-heat-table td.map-heat-change-cell {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
}

/* Shared grid table styling for non-heat tables */
.map-grid-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.map-grid-table th,
.map-grid-table td {
    box-sizing: border-box;
    border: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    vertical-align: middle;
}

.map-grid-table thead tr:first-child th,
.map-grid-table tr > :first-child {
    border-left: 1px solid #d0d0d0;
}

.map-grid-table thead tr:first-child th {
    border-top: 1px solid #d0d0d0;
}

.map-grid-table thead th {
    text-align: center;
    background: #f8f9fa;
    font-weight: 600;
    white-space: normal;
}

.map-grid-table thead th > .plot-th-label,
.map-grid-table thead th > .plot-sort-icon,
.map-grid-table thead th > .plot-sort-icons,
.map-grid-table thead th > .map-th-help-inline {
    vertical-align: middle;
}

.map-grid-table thead th > .plot-sort-icon,
.map-grid-table thead th > .plot-sort-icons {
    display: inline-block;
    margin-left: 0.1rem;
    opacity: 0.75;
}

.map-grid-table thead th > .map-th-help-inline {
    display: inline-block;
}

.map-grid-table tbody td {
    text-align: center;
    background: #fff;
}

.map-grid-table td > div {
    text-align: inherit;
}

.map-grid-table tbody td.text-end {
    text-align: end;
}

.mapper-results .map-table-section-heading {
    margin-bottom: 0.75rem;
}

.mapper-results .map-table-section-title {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.24);
    font-weight: 600;
    line-height: 1.2;
}

.mapper-results .map-table-section-description,
.mapper-results .plot-table-section-description {
    margin: 0 0 0.75rem;
    max-width: 72rem;
    color: rgba(0, 0, 0, 0.72);
    font-size: 0.92rem;
    line-height: 1.4;
}

.mapper-results .map-table-section-description:last-child,
.mapper-results .plot-table-section-description:last-child {
    margin-bottom: 0;
}

.mapper-results .map-table-loading-note {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 0.5rem;
    color: rgba(0, 0, 0, 0.72);
    font-size: 0.92rem;
    line-height: 1.35;
}

.mapper-results .map-table-loading-note .spinner-border {
    flex: 0 0 auto;
}

/* ---------- Mapper tables ---------- */
.map-selected-wrap {
    position: relative;
}

.map-selected-wrap .card-body {
    position: relative;
}

.mapper-results-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(1.5px);
}

.mapper-results-loading[hidden] {
    display: none !important;
}

.mapper-results-loading-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(27, 94, 32, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    color: #214d25;
    font-weight: 600;
}

#map-sel-tabs .nav-link:hover:not(.active) {
    border-color: var(--bs-border-color);
    border-bottom-color: transparent;
}


#map-sel-tabs .nav-link {
    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.05;
    height: 2.3rem;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

#map-sel-tabs .nav-item {
    flex: 0 0 auto;
}

#map-sel-tabs .nav-item.map-sel-help-item .nav-link,
#map-sel-tabs > .nav-item:first-child .nav-link,
#map-sel-help-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 2.15rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

#map-sel-tabs {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 0.1rem;
    column-gap: 0.2rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

#map-sel-tabs .nav-item:not(.map-sel-help-item):not(:first-child) {
    flex: 0 0 auto;
}

#map-sel-tabs .nav-item:not(.map-sel-help-item):not(:first-child) .nav-link {
    width: auto;
    text-align: center;
}

#mapper-pane[data-layout-resolved="split"] #map-sel-tabs {
    column-gap: 0.35rem;
}

#mapper-pane[data-layout-resolved="split"] #map-sel-tabs .nav-item:not(.map-sel-help-item):not(:first-child) .nav-link {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

@media (max-width: 1674.98px) {
    #mapper-pane[data-layout-resolved="split"][data-layout-source="manual"] #map-sel-tabs {
        flex-wrap: wrap;
        overflow: visible;
        row-gap: 0.35rem;
    }
}

@media (min-width: 1675px) {
    #map-sel-tabs .nav-link {
        text-align: center;
        font-size: 1rem;
        line-height: 1.05;
    }
}

.map-selected-wrap:not(.is-empty) .map-selected-empty {
    display: none !important;
}

.map-selected-empty {
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bs-secondary-color);
    background: rgba(255, 255, 255, 0.75);
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.4rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.65rem;
}

.map-selected-wrap.is-empty-nonhelp .tab-content .tab-pane {
    display: none !important;
}

/* Bootstrap's tab transitions can leave these panes behaving like fixed-height containers.
   Keep the mapper results in normal flow so the cards size to their content. */
.mapper-results .tab-content,
.mapper-results .tab-pane {
    position: relative !important;
    min-height: 0 !important;
    height: auto !important;
}

/* Let each mapper table use the full card width and scroll inside its own box when needed. */
.mapper-results .table-responsive {
    width: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    position: relative;
    background: #fff;
}

#mapper-pane[data-layout-resolved="split"] .mapper-results .table-responsive {
    max-height: 40vh;
}

#mapper-pane[data-layout-resolved="split"] #map-sel-land .table-responsive,
#mapper-pane[data-layout-resolved="split"] #map-sel-selected .table-responsive,
#mapper-pane[data-layout-resolved="split"] #map-sel-census .table-responsive {
    max-height: 62vh;
}

#mapper-pane[data-layout-resolved="stacked"] .mapper-results .table-responsive {
    max-height: none;
}

.mapper-results .table-responsive > table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    background: #fff;
}

.mapper-results .map-grid-table th:not(.map-col-id):not(.map-col-x),
.mapper-results .map-grid-table td:not(.map-col-id):not(.map-col-x) {
    min-width: 5rem;
}

.mapper-results .map-heat-table thead tr.plot-head-years th,
.mapper-results .map-heat-table tbody td:not(.map-col-id):not(.map-col-x) {
    min-width: 5rem;
}

/* Keep the header row and the left ID column visible while the table itself scrolls. */
.mapper-results .table-responsive > .map-grid-table thead th,
.mapper-results .table-responsive > .map-heat-table thead tr.plot-head-groups th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f8f9fa;
    vertical-align: middle;
    box-shadow: inset 0 -1px 0 #d0d0d0;
}

.mapper-results .table-responsive > table thead tr.plot-head-years th {
    position: sticky;
    top: var(--mapper-sticky-head-offset, 0px);
    z-index: 3;
    background: #f8f9fa;
    vertical-align: middle;
    box-shadow: inset 0 -1px 0 #d0d0d0;
}

/* Let the first scrolling year column move beneath the sticky ID column. */
.mapper-results .table-responsive > table thead tr.plot-head-years th:first-child {
    z-index: 1;
}

.mapper-results .table-responsive > .map-grid-table thead th.map-col-id,
.mapper-results .table-responsive > .map-heat-table thead tr.plot-head-groups th.map-col-id {
    z-index: 6;
}

.mapper-results .table-responsive > .map-grid-table thead th.map-col-id,
.mapper-results .table-responsive > .map-heat-table thead tr.plot-head-groups th.map-col-id {
    position: sticky;
    left: 0;
    background: #f8f9fa;
}

.mapper-results .table-responsive > .map-grid-table tbody td.map-col-id,
.mapper-results .table-responsive > .map-heat-table tbody td.map-col-id {
    position: sticky;
    left: 0;
    z-index: 3;
    background-color: var(--map-sticky-first-col-bg, #fff);
    box-shadow: 6px 0 8px -8px rgba(0, 0, 0, 0.2);
}

/* Keep the ID and remove columns narrow so the data columns can use the remaining width. */
.mapper-results td.map-col-id,
.mapper-results th.map-col-id {
    width: 1%;
    min-width: 11rem;
    max-width: 14.4rem;
    white-space: normal;
}

.mapper-results td.map-col-x,
.mapper-results th.map-col-x {
    width: 1%;
    min-width: 2.75rem;
    max-width: 2.75rem;
    white-space: nowrap;
}

.mapper-results .table-responsive > table[data-sort-table="heat_temp"] thead th.map-col-id,
.mapper-results .table-responsive > table[data-sort-table^="sel_"] thead th.map-col-id,
.mapper-results .table-responsive > table[data-sort-table="census"] thead th.map-col-id {
    box-shadow: inset 0 -1px 0 #d0d0d0, inset -1px 0 0 #d0d0d0;
}

.mapper-results .table-responsive > table[data-sort-table="heat_temp"] tbody td.map-col-id,
.mapper-results .table-responsive > table[data-sort-table^="sel_"] tbody td.map-col-id,
.mapper-results .table-responsive > table[data-sort-table="census"] tbody td.map-col-id {
    box-shadow: inset -1px 0 0 #d0d0d0, 6px 0 8px -8px rgba(0, 0, 0, 0.2);
}

.mapper-results .table-responsive > table[data-sort-table="heat_temp"] thead tr.plot-head-years th:nth-child(3n),
.mapper-results .table-responsive > table[data-sort-table="heat_events"] thead tr.plot-head-years th:nth-child(3n),
.mapper-results .table-responsive > table[data-sort-table^="sel_"] thead tr.plot-head-years th:nth-child(3n) {
    box-shadow: inset 0 -1px 0 #d0d0d0, inset -1px 0 0 #d0d0d0;
}

.mapper-results .mapper-selected-table.map-grid-table th.map-selected-col-color,
.mapper-results .mapper-selected-table.map-grid-table td.mapper-selected-col-color {
    width: 5.625rem;
    min-width: 5.625rem;
    max-width: 5.625rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    white-space: nowrap;
}

#map-sel-selected .mapper-selected-table th.map-col-x,
#map-sel-selected .mapper-selected-table td.map-col-x {
    min-width: 3.5rem;
    max-width: 3.5rem;
    text-align: center;
}

#map-sel-selected .mapper-selected-table th.map-col-x .plot-th-label {
    display: block;
    text-align: center;
}

.mapper-results .map-idwrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    max-width: 14.4rem;
    min-width: 0;
    white-space: normal;
}

.mapper-results .map-idwrap .map-idlabels {
    flex: 1 1 auto;
    min-width: 0;
}

.mapper-results .map-idwrap .map-idlabels .fw-semibold,
.mapper-results .map-idwrap .map-idlabels .small {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

.mapper-results .plot-wide-break {
    display: none;
}

.mapper-results .map-sel-zoom {
    line-height: 1;
    text-decoration: none;
}

#map-sel-land thead th,
#map-sel-census thead th,
#map-sel-hvi thead th {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.mapper-results th .map-th-help.map-th-help-inline {
    margin-left: 0.12rem;
    margin-right: 0.12rem;
}

.mapper-results .table-responsive > table[data-sort-table="selected"] th .map-th-help.map-th-help-inline,
.mapper-results .table-responsive > table[data-sort-table="heat_temp"] th .map-th-help.map-th-help-inline,
.mapper-results .table-responsive > table[data-sort-table="heat_events"] th .map-th-help.map-th-help-inline,
.mapper-results .table-responsive > table[data-sort-table^="sel_"] th .map-th-help.map-th-help-inline {
    margin-left: 0.25rem;
}

#map-sel-heat thead th > .plot-sort-icon,
#map-sel-heat thead th > .plot-sort-icons {
    margin-left: 0.1rem;
}

.mapper-results .map-th-pctile-note {
    display: inline-block;
    margin-top: 0.15rem;
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    line-height: 1.15;
    font-weight: 600;
}

#map-sel-hvi th.map-th-inline-center {
    text-align: center;
}

#map-sel-hvi th.map-th-inline-center .plot-th-label {
    display: inline-block;
    text-align: center;
    line-height: 1.15;
    vertical-align: bottom;
}

#map-sel-hvi th.map-th-inline-center > :is(.plot-sort-icon, .plot-sort-icons, .map-th-help-inline) {
    vertical-align: text-bottom;
}

#map-sel-hvi th.map-th-stack-icons {
    text-align: center;
}

#map-sel-hvi th.map-th-stack-icons .plot-th-label {
    display: block;
}

#map-sel-hvi th.map-th-stack-icons .map-th-icons-break {
    display: block;
}

#map-sel-hvi th.map-th-stack-icons .map-th-help.map-th-help-inline {
    margin-left: 0.15rem;
    margin-right: 0.2rem;
}

/* Selections tab collapsible section */
.map-sel-section.is-collapsed .map-sel-collapse-body {
    display: none;
}

.map-sel-collapse-btn {
    color: var(--bs-secondary-color);
    text-decoration: none;
    line-height: 1;
}

.map-sel-collapse-btn:hover {
    color: var(--bs-body-color);
}

.map-sel-collapse-title {
    cursor: pointer;
}

.mapper-results .map-hvi-controls-row {
    flex-wrap: wrap;
}

.mapper-results .map-hvi-mode-row {
    width: 100%;
}

.mapper-results .map-hvi-table-view {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 0.5rem;
    background: #f8f9fa;
}

.mapper-results .map-table-control-wrap {
    display: inline-flex;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 0.5rem;
    background: #f8f9fa;
}

.mapper-results #map-heat-temp-options {
    background: #f8f9fa;
}

.mapper-results .map-hvi-table-view-label,
.mapper-results .map-table-control-label {
    font-weight: 400;
}

.mapper-results .map-hvi-table-view .form-check-inline,
.mapper-results .map-table-control-wrap .form-check-inline {
    margin-right: 0;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding-top: 0.1rem;
}

.mapper-results .map-hvi-table-view .form-check,
.mapper-results .map-table-control-wrap .form-check {
    margin-bottom: 0;
}

.mapper-results .map-hvi-table-view .form-check-input,
.mapper-results .map-table-control-wrap .form-check-input {
    margin-top: 0.24rem;
}

.mapper-selected-table-wrap {
    flex: 1 1 auto;
}

.map-sel-help-pane {
    font-size: 0.9rem;
    line-height: 1.35;
}

.map-sel-help-pane h6,
.map-sel-help-pane .map-sel-help-lead {
    font-size: 1rem;
}

.map-sel-help-pane .map-sel-help-lead {
    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-weight: 500;
}

.map-sel-help-pane h6 {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.map-sel-help-pane p {
    margin-bottom: 0.6rem;
}

.map-sel-help-card {
    background-color: #fff;
    border: 1px solid rgba(31, 31, 31, 0.18);
    border-radius: 0.35rem;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.8rem;
}

.map-sel-help-card > :last-child {
    margin-bottom: 0;
}

.map-sel-help-card.map-sel-help-card-light {
    background-color: #fff;
    border-color: rgba(31, 31, 31, 0.18);
}



.map-sel-help-tools {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.map-sel-help-tools td {
    vertical-align: top;
    padding: 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    white-space: normal !important;
    word-break: break-word;
    box-sizing: border-box;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
}

.map-sel-help-tools td:last-child {
    padding-right: 0.6rem;
    width: auto !important;
    max-width: none !important;
    white-space: normal !important;
}

.map-sel-help-tools td:first-child {
    width: auto !important;
    max-width: none !important;
    white-space: normal !important;
}

.map-sel-help-tools p {
    margin-bottom: 0;
    white-space: normal;
}

.map-sel-help-tools tbody,
.map-sel-help-tools tr {
    display: contents;
}

.map-sel-help-tools strong {
    white-space: normal;
}

.map-sel-help-tools .map-sel-help-tools-span-all {
    grid-column: 1 / -1;
}

@media (min-width: 1675px) {
    .map-sel-help-tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.map-sel-help-tools .map-sel-help-tools-nav {
        grid-column: 1 / -1;
    }
}

#mapper-pane[data-layout-resolved="stacked"] .map-sel-help-tools {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

#mapper-pane[data-layout-resolved="stacked"] .map-sel-help-tools .map-sel-help-tools-nav {
    grid-column: auto;
}

#mapper-pane[data-layout-resolved="split"] .map-sel-help-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#mapper-pane[data-layout-resolved="split"] .map-sel-help-tools .map-sel-help-tools-nav {
    grid-column: 1 / -1;
}

.map-sel-help-temp-types {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border: 0.5px solid #000;
    background: #fff;
}

.map-sel-help-temp-types .map-sel-help-temp-col-air {
    width: 22%;
}

.map-sel-help-temp-types .map-sel-help-temp-col-hi {
    width: 35%;
}

.map-sel-help-temp-types .map-sel-help-temp-col-wbgt {
    width: 43%;
}

.map-sel-help-temp-types th,
.map-sel-help-temp-types td {
    vertical-align: top;
    padding: 0.55rem 0.6rem;
    border: 0.5px solid #000;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    min-width: 0;
}

.map-sel-help-temp-types th {
    font-weight: 700;
    background: #fff;
    color: #000;
}

.map-sel-help-pane .map-sel-help-list {
    padding-left: 1.1rem;
}

.map-sel-help-pane .map-sel-help-list li {
    margin-bottom: 0.55rem;
}

.mapper-help-tool-active {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border-radius: 0.2rem;
    background: #1b5e20;
    color: #ffea00;
}

.mapper-identify-toggle.mapper-identify-toggle-sample {
    position: static;
    top: auto;
    right: auto;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    margin: 0 0.2rem;
    vertical-align: middle;
    pointer-events: none;
    cursor: default;
}

.mapper-pane-layout-toggle.mapper-pane-layout-toggle-sample {
    margin: 0 0.15rem;
    vertical-align: middle;
    pointer-events: none;
    cursor: default;
}

.mapper-selected-controls {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.35rem;
}

.mapper-selected-controls-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mapper-selected-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#map-selected-btn-export.btn-link {
    --bs-btn-padding-y: 0;
    --bs-btn-padding-x: 0;
    --bs-btn-color: var(--bs-link-color);
    --bs-btn-hover-color: var(--bs-link-hover-color);
    --bs-btn-active-color: var(--bs-link-hover-color);
    --bs-btn-disabled-color: #6c757d;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-border-color: transparent;
    text-align: left;
}

.plot-graphs-btn-export {
    text-decoration: underline;
    white-space: nowrap;
}

#map-selected-btn-save {
    --bs-btn-color: #fff;
    --bs-btn-bg: #198754;
    --bs-btn-border-color: #198754;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #157347;
    --bs-btn-hover-border-color: #146c43;
    --bs-btn-focus-shadow-rgb: 60, 153, 110;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #146c43;
    --bs-btn-active-border-color: #13653f;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #198754;
    --bs-btn-disabled-border-color: #198754;
}

.mapper-selected-row-color-line {
    width: 100%;
}

.mapper-selected-alias-input {
    min-width: 0;
    width: 100%;
    padding: 0.2rem 0.45rem;
}

.mapper-color-picker {
    position: relative;
    display: inline-block;
}

.mapper-selected-table-wrap.table-responsive {
    min-height: 225px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-gutter: auto;
}

#mapper-pane[data-layout-resolved="stacked"] .mapper-results .plot-wide-break {
    display: none !important;
}

#mapper-pane[data-layout-resolved="split"] .mapper-results .plot-wide-break {
    display: block;
    width: 100%;
    height: 0;
}

.mapper-selected-table,
.mapper-selected-table td,
.mapper-selected-table th,
.mapper-selected-col-color {
    overflow: visible;
}

.mapper-color-picker.is-disabled .mapper-color-trigger {
    cursor: not-allowed;
    opacity: 0.65;
}

.mapper-color-picker.is-disabled .mapper-color-grid {
    display: none;
}

.mapper-color-trigger {
    list-style: none;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.35rem;
    background: #fff;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mapper-color-trigger::-webkit-details-marker {
    display: none;
}

.mapper-color-preview {
    width: 18px;
    height: 18px;
    border-radius: 0.2rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    display: inline-block;
}

.mapper-color-grid {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    bottom: auto;
    left: auto;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.3rem;
    padding: 0.45rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.45rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    min-width: 150px;
}

.mapper-color-option {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.2rem;
    padding: 0;
    cursor: pointer;
}

.mapper-color-option.is-active {
    outline: 2px solid #000;
    outline-offset: 1px;
}

.mapper-selected-alias-input:disabled {
    background: #f1f3f5;
    color: rgba(0, 0, 0, 0.65);
    border-color: rgba(0, 0, 0, 0.12);
    cursor: not-allowed;
}

.mapper-import-error-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.45);
}

.mapper-import-error-dialog {
    width: min(560px, 100%);
    border-radius: 0.5rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.map-sel-caret {
    font-size: 1.05rem;
    line-height: 1;
}

.palette-dropdown {
    display: inline-block;
}

.palette-dropdown-menu {
    max-height: 280px;
    overflow: auto;
    max-width: none;
}

.palette-dropdown-item {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.palette-dropdown .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.palette-bar {
    display: flex;
    width: 160px; /* was 160px, now 20% smaller */
    height: 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 3px;
    overflow: hidden;
}

.palette-bar span {
    flex: 1 1 0;
}

.palette-dropdown-item:hover,
.palette-dropdown-item:focus {
    background: rgba(0, 0, 0, 0.12);
}

.palette-dropdown-item.active {
    background: rgba(0, 0, 0, 0.22);
}

.palette-dropdown-item.active .palette-bar {
    border: 2px solid rgba(0, 0, 0, 0.55);
}

#mapper-pane #btn-mapper-back {
    background-color: #fff;
}

#mapper-pane #btn-mapper-back:hover,
#mapper-pane #btn-mapper-back:focus-visible {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: #fff;
}

#mapper-pane > .mapper-pane-side .map-selected-wrap .card-body {
    background: #fff;
}

#mapper-pane > .mapper-pane-side .map-selected-wrap .card-body:has(#map-sel-help.tab-pane.show.active) {
    background: var(--bs-light);
}
