/* This map owns its complete layout, including when shared page styles change. */
section.useful-map{display:grid!important;grid-template-columns:minmax(0,1fr) 310px!important;grid-template-rows:minmax(0,1fr);width:100%;max-width:100%;min-width:0;box-sizing:border-box;height:clamp(550px,calc(100dvh - 185px),900px);margin:0 0 16px;border:1px solid #d4dedf;border-radius:9px;background:#fff;overflow:hidden;position:relative}
section.useful-map>.incident-map-main{display:flex!important;flex-direction:column;grid-column:1;grid-row:1;min-width:0;min-height:0;width:auto;height:100%;overflow:hidden}
section.useful-map .map-explorer-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:7px 10px;flex:none;border-bottom:1px solid #d4dedf;background:#fff}
section.useful-map .map-explorer-toolbar h1{font-size:18px!important;line-height:1.25;margin:0!important}
section.useful-map .map-explorer-toolbar button{font-size:12px!important;padding:5px 8px!important;min-height:32px!important;margin:0;border-radius:5px}
section.useful-map .incident-map-canvas{display:block;position:relative;flex:1 1 0!important;width:100%;height:0!important;min-height:0!important;overflow:hidden}
section.useful-map #useful-map{display:block;width:100%;height:100%!important;min-height:0!important;border-radius:0;z-index:0}
section.useful-map .map-explorer-status{position:absolute;inset:auto 7px 7px;z-index:500;background:#ffffffed;border:1px solid #d4dedf;border-radius:4px;padding:5px 7px;font-size:11px;line-height:1.4;pointer-events:none}
section.useful-map .leaflet-bottom{bottom:52px}
section.useful-map>#catalog-panel{display:flex!important;flex-direction:column;grid-column:2;grid-row:1;position:relative!important;inset:auto!important;width:310px!important;max-width:310px!important;height:100%!important;max-height:100%!important;min-height:0;box-sizing:border-box;border:0;border-left:1px solid #d4dedf;border-radius:0;background:#fffdf8;overflow:hidden!important;transform:none!important;z-index:1}
section.useful-map.filters-closed{grid-template-columns:minmax(0,1fr)!important}
section.useful-map.filters-closed>#catalog-panel{display:none!important}
section.useful-map .map-filter-heading{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:7px 10px;border-bottom:0;flex:none;position:static;background:#fffdf8}
section.useful-map .map-filter-heading h2{font-size:15px!important;line-height:1.3;margin:0!important}
section.useful-map .map-filter-heading button{min-height:28px!important;width:28px;padding:0!important;font-size:20px!important;line-height:26px;border-radius:5px}
.catalog-tabs{display:flex;gap:4px;padding:0 10px 7px;flex:none;border-bottom:1px solid #d4dedf}
.catalog-tabs button{flex:1;min-width:0;min-height:32px!important;padding:4px 6px!important;margin:0!important;font-size:13px!important;border:0;border-radius:5px;background:#eef1ef;color:#425b66}
.catalog-tabs button[aria-selected=true]{background:#17616b;color:#fff}
.catalog-scroll{display:flex;flex:1 1 0;min-width:0;min-height:0;overflow:hidden;padding:8px 10px 0}
.catalog-scroll>section{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden}
.catalog-search-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
section.useful-map .catalog-scroll input[type=search]{flex:none;box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;height:32px!important;min-height:32px!important;font-size:12px!important;line-height:1.3;padding:5px 8px!important;margin:0 0 7px!important;border:1px solid #bacdd2;border-radius:5px}
.catalog-regions{display:flex;gap:4px;flex-wrap:wrap;margin:0 0 7px;flex:none}
.catalog-categories{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px;margin:0 0 7px;flex:none}
.catalog-regions button,.catalog-categories button{box-sizing:border-box;border:1px solid #cad6d8;background:#fff;color:#38535d;border-radius:5px;padding:5px!important;margin:0!important;min-height:28px!important;font-size:11px!important;line-height:1.25;white-space:normal}
.catalog-regions button[aria-pressed=true],.catalog-categories button[aria-pressed=true]{border-color:#17616b;background:#e4f1ef;color:#124b53}
.catalog-actions{display:flex;gap:13px;flex-wrap:wrap;margin:0 0 4px;flex:none}
.catalog-actions button{padding:2px 0!important;min-height:25px!important;margin:0!important;border:0;background:transparent;color:#17616b;text-decoration:underline;font-size:11px!important;line-height:1.3}
.catalog-count{font-size:11px!important;line-height:1.4;color:#536a74;margin:2px 0 5px!important;flex:none}
#route-list,#object-list{flex:1 1 0;min-height:70px;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid #d4dedf;padding:0 5px 0 0}
.catalog-row{border:0;border-bottom:1px solid #dbe2e2;padding:8px 0!important;margin:0!important;background:transparent;box-shadow:none}
.catalog-row.is-active{background:#eaf2f5;border-radius:3px;box-shadow:none}
.catalog-row-head{display:flex;align-items:center;gap:6px;min-width:0}
section.useful-map .catalog-row input[type=checkbox],section.useful-map .catalog-trails input{width:16px!important;height:16px!important;flex:none;margin:0!important;accent-color:#17616b}
.catalog-name{display:block;flex:1;min-width:0;text-align:left;border:0;background:none!important;color:#193f50;font-size:12px!important;font-weight:600;line-height:1.35;padding:0!important;margin:0!important;min-height:26px!important;cursor:pointer;border-radius:0}
.catalog-name:hover{text-decoration:underline}
.route-swatch{color:#fff;font-size:10px;font-weight:bold;border-radius:3px;line-height:18px;min-width:20px;text-align:center;flex:none}
.catalog-info{flex:none;border:0;background:transparent;color:#17616b;font-size:18px!important;line-height:24px;min-height:26px!important;width:26px;padding:0!important;margin:0!important}
.catalog-meta{font-size:10px!important;line-height:1.35;color:#536a74;margin:3px 0 0 22px!important}
.catalog-badge{display:inline-block;font-size:9px!important;line-height:1.3;padding:1px 4px;background:#fff0da;color:#775018;margin:4px 0 0 22px!important;border-radius:3px}
.catalog-trails{display:flex;align-items:center;gap:6px;font-size:11px!important;font-weight:400!important;line-height:1.3;margin:0 0 6px!important;flex:none}
section.useful-map #objects-refresh{flex:none;min-height:26px!important;padding:3px 0!important;font-size:10px!important;margin:2px 0!important}
section.useful-map .map-filter-footer{display:flex;flex-direction:row;gap:5px;flex:none;position:static;padding:7px 10px;border-top:1px solid #d4dedf;background:#fffdf8}
section.useful-map .map-filter-footer button{width:100%;min-height:32px!important;font-size:11px!important;line-height:1.2;padding:5px 7px!important;margin:0!important}
section.useful-map #catalog-apply{display:none}
section.useful-map>.map-filter-backdrop{display:none}
.route-point-icon,.catalog-object-icon{background:transparent;border:0}
.route-point{display:block;color:var(--marker-color);font-size:19px;line-height:25px;text-align:center;text-shadow:1px 0 white,-1px 0 white,0 1px white,0 -1px white}
.route-point.flag{font-size:24px}
.route-point.waypoint{background:var(--marker-color);color:#fff;border:1.5px solid #fff;border-radius:4px;font-size:10px;font-weight:bold;line-height:18px;width:21px;height:20px;text-shadow:none;box-shadow:0 1px 2px #0003}
.object-symbol{display:block;width:24px;height:24px;background:#fffdf8;border:1.5px solid #536b74;border-radius:5px;color:#355e69;font-size:20px;font-weight:700;line-height:21px;text-align:center;box-shadow:0 1px 2px #0002}
.object-water{color:#1674aa;border-color:#1674aa;font-size:16px}.object-rescue{color:#ad3c3c;border-color:#ad3c3c}
section.useful-map button:focus-visible,section.useful-map input:focus-visible{outline:2px solid #1769b3;outline-offset:2px}
section.useful-map [hidden]{display:none!important}
.route-details-dialog{box-sizing:border-box;width:min(430px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:80dvh;padding:0;border:1px solid #c9d7db;border-radius:9px;background:#fffdf8;color:#193f50;box-shadow:0 8px 40px #1234}
.route-details-dialog::backdrop{background:#12304455}
.route-details-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid #d4dedf}
.route-details-heading h2{font-size:17px!important;line-height:1.35;margin:0!important}
.route-details-heading button{flex:none;min-height:32px!important;width:32px;padding:0!important;font-size:22px!important}
#route-details-body{padding:12px 14px;overflow-wrap:anywhere}
.route-details-meta{font-size:12px!important;font-weight:600;margin:0 0 8px!important}
.catalog-details{font-size:12px;line-height:1.5;padding:0}
.catalog-details p{font-size:12px!important;margin:7px 0!important}
.catalog-details small{display:block;font-size:10px;color:#536a74;margin-top:7px}
.catalog-details a,.catalog-details button{display:block;min-height:30px!important;font-size:12px!important;margin:3px 0!important;padding:3px 0!important}
.catalog-source{font-size:10px!important;color:#60707a;overflow-wrap:anywhere}
@media(max-width:900px){
section.useful-map{display:block!important;height:max(470px,calc(100dvh - 145px));min-height:470px;overflow:hidden}
section.useful-map>.incident-map-main{height:100%;width:100%}
section.useful-map .map-explorer-toolbar h1{font-size:16px!important}
section.useful-map .map-explorer-toolbar button{font-size:11px!important;min-height:36px!important;max-width:55%}
section.useful-map>#catalog-panel{position:fixed!important;inset:auto 0 0!important;width:100%!important;max-width:none!important;height:85dvh!important;max-height:85dvh!important;min-height:0;grid-column:auto;border:1px solid #d4dedf;border-bottom:0;border-radius:13px 13px 0 0;z-index:3100}
section.useful-map.filters-closed>#catalog-panel{display:none!important}
section.useful-map>.map-filter-backdrop:not([hidden]){display:block;position:fixed;inset:0;width:100%;height:100%;border:0;border-radius:0;margin:0;padding:0;background:#12304455;z-index:3000}
.map-drawer-open{overflow:hidden}
section.useful-map .map-filter-heading{padding:8px 12px}
section.useful-map .map-filter-heading button{width:34px;min-height:34px!important}
.catalog-tabs{padding:0 12px 7px}.catalog-tabs button{min-height:36px!important}
.catalog-scroll{padding:8px 12px 0}
section.useful-map .catalog-scroll input[type=search]{height:36px!important;min-height:36px!important;font-size:16px!important}
.catalog-categories button,.catalog-regions button{min-height:34px!important;font-size:12px!important}
.catalog-name{min-height:34px!important;font-size:13px!important}
.catalog-info{min-height:34px!important;width:32px}
.catalog-row{padding:7px 0!important}
section.useful-map .catalog-row input[type=checkbox]{width:19px!important;height:19px!important}
.catalog-actions button{min-height:30px!important}.catalog-trails{min-height:30px}
section.useful-map .map-filter-footer{padding:7px 12px max(7px,env(safe-area-inset-bottom))}
section.useful-map .map-filter-footer button{min-height:36px!important;flex:1;font-size:12px!important}
section.useful-map #catalog-apply{display:block}
}
/* Landscape phones and enlarged browser text keep one usable scrolling area. */
@media(max-width:900px) and (max-height:500px){
section.useful-map>#catalog-panel{height:95dvh!important;max-height:95dvh!important}
section.useful-map .catalog-scroll{display:block;overflow-y:auto!important;overscroll-behavior:contain}
section.useful-map .catalog-scroll>section{display:block;overflow:visible;min-height:0}
section.useful-map #route-list,section.useful-map #object-list{max-height:none;min-height:0;overflow:visible}
}
