/* Map and terrain tools (/tools/elevation-profile/ and the others): the map stage, its bar, the chart, the panel's
   extras. On top of the maker layout (gifts/globes/maker.css). */

.gis-stage { --chart-h: 236px; }
.gis-bar { gap: 8px 10px; position: relative; z-index: 5; }
.gis-map { background: #1b1d24; }
.gis-map .maplibregl-canvas { outline: none; }
.gis-map.gis-drop { box-shadow: inset 0 0 0 3px var(--gold); }

/* search */
.gis-search { position: relative; flex: 1 1 220px; min-width: 180px; display: flex; align-items: center; background: rgba(0, 0, 0, 0.3); border-radius: 9px; padding: 0 10px; }
.gis-search > .bx { color: var(--muted); font-size: 1.05rem; }
.gis-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 0.88rem; padding: 8px 8px; outline: none; }
.gis-search input::placeholder { color: var(--muted); }
.gis-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.gis-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: #1c201e; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-height: 320px; overflow: auto; font-size: 0.85rem; color: var(--muted); }
.gis-results[hidden] { display: none; }
.gis-results button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 8px 10px; border-radius: 7px; cursor: pointer; line-height: 1.35; }
.gis-results button:hover, .gis-results button:focus-visible { background: #2a302d; outline: none; }
.gis-results .gis-none { padding: 8px 10px; }
.gis-icon { padding: 7px 9px !important; }
.gis-icon .bx { margin: 0 !important; font-size: 1.05rem; }
.gis-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.gis-check input { accent-color: var(--gold); margin: 0; }
.gis-check-block { display: flex; white-space: normal; align-items: flex-start; margin-top: 10px; color: var(--ink); }
.gis-check-block input { margin-top: 3px; }

/* the hint on an empty map */
.gis-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 2; margin: 0; max-width: calc(100% - 120px);
    background: rgba(20, 23, 22, 0.9); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: 0.84rem; text-align: center; pointer-events: none; }
.gis-hint[hidden] { display: none; }
.gis-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); pointer-events: none; }

/* the chart under the map */
.gis-chartbox { flex: none; height: var(--chart-h); margin: 8px 10px 0; padding: 8px 10px 6px; background: #141716; border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.gis-chartbox[hidden] { display: none; }
.gis-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.85rem; margin-bottom: 2px; }
.gis-chart-head strong { font-weight: 600; }
.gis-tbtn { border: 0; background: rgba(255, 255, 255, 0.06); color: var(--muted); font: inherit; font-size: 0.78rem; padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.gis-tbtn:hover { color: var(--ink); }
.gis-tbtn[aria-pressed="true"] { background: var(--ink); color: #141716; }
.gis-chart-host { position: relative; flex: 1; min-height: 0; }
.gis-chart-host[hidden] { display: none; }
.gis-svg { display: block; width: 100%; outline: none; touch-action: pan-y; }
.gis-svg:focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 6px; }
.gis-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.78rem; color: var(--muted); padding: 2px 0 4px; }
.gis-legend[hidden] { display: none; }
.gis-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.gis-key { display: inline-block; flex: none; }
.gis-key-line { width: 14px; height: 2px; border-radius: 1px; background: var(--c); }
.gis-key-area { width: 12px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 2px 0 var(--c); }
.gis-key-band { width: 12px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--c) 22%, transparent); }
.gis-tip { position: absolute; z-index: 3; pointer-events: none; background: rgba(28, 32, 30, 0.96); border: 1px solid rgba(236, 238, 233, 0.12); border-radius: 8px; padding: 6px 9px; font-size: 0.78rem; line-height: 1.45; color: var(--muted); white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.gis-tip[hidden] { display: none; }
.gis-tip strong { color: var(--ink); font-weight: 600; }
.gis-tip > div { display: flex; align-items: center; gap: 6px; }
.gis-tip .gis-tip-at { border-top: 1px solid rgba(236, 238, 233, 0.1); margin-top: 3px; padding-top: 3px; }
.gis-tip .gis-tip-at strong { color: var(--muted); font-weight: 500; }
.gis-tablewrap { flex: 1; min-height: 0; overflow: auto; }
.gis-tablewrap[hidden] { display: none; }
.gis-tablewrap .tpt-table { margin-top: 0; }
.gis-tablewrap th { position: sticky; top: 0; background: #141716; }

/* panel (the result list and table, as on the other tools) */
.tpt-res { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: .6rem 0 0; font-size: 0.9rem; }
.tpt-res dt { color: var(--muted); }
.tpt-res dd { margin: 0; font-weight: 600; text-align: right; }
.tpt-res dd small { font-weight: 400; color: var(--muted); }
.tpt-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.tpt-table th, .tpt-table td { padding: .3rem .4rem; border-bottom: 1px solid rgba(255, 255, 255, .1); text-align: left; }
.tpt-table th { color: var(--muted); font-weight: 600; }
.gis-chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--muted); font-size: 0.86rem; text-align: center; padding: 0 1rem; }
.gis-chart-empty[hidden] { display: none; }
.gis-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gis-btns .wm-btn { padding: 7px 11px; font-size: 0.84rem; }
.gis-file { display: flex; justify-content: center; margin-top: 14px; text-align: center; cursor: pointer; }
.gis-go { display: flex; justify-content: center; text-decoration: none; margin-top: 4px; }
.wm a.gis-go, .wm a.gis-go:hover, .wm a.gis-go:visited { color: #1d1a10 !important; }
.gis-big { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
.gis-big small { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.gis-copy { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 0.95rem; vertical-align: -2px; }
.gis-copy:hover { color: var(--ink); }
.tpt-res.gis-coords { grid-template-columns: minmax(0, 1fr); gap: 0; }
.gis-coords dt { font-size: 0.78rem; margin-top: 9px; }
.gis-coords dd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-align: left; word-break: break-word; }
.gis-verdict { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.gis-verdict[hidden] { display: none; }
.gis-verdict .bx { font-size: 1.6rem; }
.gis-yes .bx { color: var(--accent); }
.gis-no .bx { color: #e0705c; }
.gis-swatches { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; align-items: center; font-size: 0.82rem; margin-top: 10px; }
.gis-swatches i { width: 22px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.gis-swatches[hidden] { display: none; }
.gis-keyrow { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.gis-keyrow span { display: inline-flex; align-items: center; gap: 6px; }
.gis-keyrow i { width: 16px; height: 4px; border-radius: 2px; }
.gis-pts { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-top: 8px; font-variant-numeric: tabular-nums; }
.gis-pts td, .gis-pts th { padding: 4px 4px; border-bottom: 1px solid var(--rule); text-align: left; }
.gis-pts th { color: var(--muted); font-weight: 600; }
.wm-field input[type="number"] { font-variant-numeric: tabular-nums; }

/* "More map and terrain tools" under the tool */
.gis-more { max-width: 900px; margin: 2rem auto 0; padding: 0 16px; }
.gis-more h2 { font-size: 1.25rem; margin: 0 0 .8rem; }

@media (max-width: 900px) {
    .gis-stage { height: auto; min-height: 0; }
    .gis-stage .gis-map { height: 56vh; min-height: 320px; flex: none; }
    .gis-stage { --chart-h: 210px; }
    .gis-bar .gis-check span { font-size: 0.8rem; }
}
@media (max-width: 560px) {
    .gis-search { flex-basis: 100%; }
    .gis-hint { max-width: calc(100% - 70px); font-size: 0.8rem; border-radius: 12px; }
    .gis-big { font-size: 1.7rem; }
}
