/* Vegetation content only: layout is owned by the six original styles. */
[hidden]{display:none!important}
#map-attribution{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
#map-attribution .ol-attribution.ol-uncollapsible ul{max-width:none;margin:0;padding:2px 6px;font-size:10px;line-height:14px;white-space:nowrap;display:flex;align-items:center;gap:8px;width:max-content}
#map-attribution .ol-attribution.ol-uncollapsible li{display:inline-block;white-space:nowrap;flex:none}
#map-attribution .ol-attribution.ol-uncollapsible{max-width:none;width:max-content;padding:0;border-radius:3px;overflow:visible}
#map-attribution .ol-attribution:not(.ol-collapsed){display:flex;align-items:center;max-width:100%;padding:0;border-radius:3px}
#map-attribution .ol-attribution:not(.ol-collapsed) ul{display:flex;align-items:center;gap:8px;white-space:nowrap;max-width:none;min-width:0;margin:0;padding:2px 6px;font-size:10px;line-height:14px;overflow-x:auto;scrollbar-width:thin}
#map-attribution .ol-attribution:not(.ol-collapsed) li{flex:none;white-space:nowrap}
#map-attribution .ol-attribution.ol-collapsed{display:flex;width:24px;min-width:24px;height:24px;padding:0}
#map-attribution .ol-attribution button{position:static;float:none;flex:0 0 24px;width:24px;height:24px;margin:0;transform:none}
#sync-badge{position:fixed;top:calc(var(--header-height) + 18px);left:48px;background:#fffffff0;color:#526780;border-radius:12px;padding:5px 9px;font-size:10px;z-index:1000;pointer-events:none}
#sync-badge.error{color:#a6431c;background:#fff3e8}
.layer-row{display:flex;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid #edf0f3}.layer-row label{flex:1;cursor:pointer}.layer-row small{font-size:11px;color:#738294}.layer-row input{accent-color:var(--vegetation-blue)}
.vegetation-layer-help{font-size:11px;line-height:1.4;color:#526780;margin:0 0 8px}
.vegetation-layer-handle{flex:0 0 28px;width:28px;height:34px;padding:0;border:0;border-radius:5px;background:transparent;color:#657b9e;font-size:24px;cursor:grab;touch-action:none;user-select:none}
.vegetation-layer-handle:hover,.vegetation-layer-handle:focus-visible{background:#e8eef9;color:var(--vegetation-blue);outline:2px solid #a4bce5;outline-offset:-2px}
.layer-row.is-dragging{background:#e8eef9;outline:1px dashed var(--vegetation-blue);outline-offset:-1px}.layer-row.is-dragging .vegetation-layer-handle{cursor:grabbing}
.layer-row label{min-width:0;overflow-wrap:anywhere}
/* Show all ten layers at ordinary viewport heights; retain access on short screens. */
#layer-panel{overflow:hidden}
#layer-panel .panel-content{max-height:none!important;min-height:0;overflow-y:auto;padding:10px 14px}
#layer-panel .layer-row{padding:3px 0;flex-wrap:wrap}
:is(#layer-panel,#legend-panel) .vegetation-intention-info{flex:0 0 28px;width:28px;height:34px;border:0;border-radius:5px;background:transparent;color:var(--vegetation-blue);padding:0;cursor:pointer}
:is(#layer-panel,#legend-panel) .vegetation-intention-info:hover{background:#e8eef9}
:is(#layer-panel,#legend-panel) .vegetation-intention-info:focus-visible{outline:2px solid #a4bce5;outline-offset:-2px}
#intention-info-dialog{width:760px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:12px;margin:auto;color:var(--vegetation-blue);box-shadow:0 12px 40px #0004;overflow:auto;scrollbar-width:thin;scrollbar-color:#b6c0cc transparent;scrollbar-gutter:stable}
#intention-info-dialog::-webkit-scrollbar{width:4px;height:4px}
#intention-info-dialog::-webkit-scrollbar-track{background:transparent}
#intention-info-dialog::-webkit-scrollbar-thumb{background:#b6c0cc;border-radius:4px}
#intention-info-dialog::-webkit-scrollbar-thumb:hover{background:#8799ae}
#intention-info-dialog::-webkit-scrollbar-button{display:none;width:0;height:0}
@supports selector(::-webkit-scrollbar){#intention-info-dialog{scrollbar-width:auto;scrollbar-color:auto}}
#intention-info-dialog::backdrop{background:rgba(15,30,50,.45)}
#intention-info-dialog .modal-dialog{margin:0;min-height:0;max-width:none;pointer-events:auto}
#intention-info-dialog .modal-content{display:flex;flex-direction:column;border:0}
#intention-info-dialog .modal-header{display:grid;grid-template-columns:24px minmax(0,1fr) 24px;align-items:center;justify-content:space-between;background:#f8f9fa;gap:16px;padding:14px 18px;border-bottom:1px solid #e5e9ef}
#intention-info-dialog .modal-title{margin:0;font-size:20px;line-height:1.3;font-weight:800;font-family:'PP Fragment',Georgia,serif;color:var(--vegetation-blue);grid-column:2;grid-row:1;text-align:center}
#intention-info-dialog .btn-close{flex:0 0 24px;width:24px;height:24px;margin:0;padding:0;background-size:12px;opacity:.65;grid-column:3;grid-row:1}
#intention-info-dialog .btn-close:focus{box-shadow:none}
#intention-info-dialog .btn-close:focus-visible{outline:2px solid #a4bce5;outline-offset:2px}
#intention-info-dialog .modal-body{padding:18px;font-size:14px;line-height:1.6}
#layer-panel .vegetation-layer-help{margin-bottom:4px}
@media (max-width:760px){
 #layer-panel{max-height:calc(100dvh - var(--header-height) - 120px - env(safe-area-inset-bottom,0px))!important}
}
.swatch{display:inline-block;width:12px;height:12px;flex-shrink:0;border:1px solid #0002;border-radius:3px}
.muted{color:#6b7d90;font-size:12px}.base-option{display:block;padding:10px 0;border-bottom:1px solid #eee}
.vegetation-qgis-legend{border-bottom:1px solid #edf0f3;padding-bottom:8px;min-width:0}
.vegetation-qgis-legend summary{cursor:pointer;display:list-item;list-style-position:inside;overflow-wrap:anywhere}
.vegetation-qgis-legend .legend-list{margin-top:8px}
.vegetation-qgis-legend .legend-label{min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.vegetation-qgis-legend .legend-symbol{width:32px;height:auto;min-height:24px}
.vegetation-qgis-legend .legend-symbol img{display:block;max-width:32px;height:auto;object-fit:contain}
.vegetation-qgis-legend .vegetation-legend-heading{border:0;background:transparent;font-weight:600}
/* Selection is a compact, non-modal floating card, independent of offcanvas. */
#feature-panel.vegetation-attribute-panel{position:fixed;top:calc(var(--header-height) + 18px);left:36px;right:auto;bottom:auto;display:flex;flex-direction:column;width:260px;max-width:calc(100vw - 56px);height:auto;max-height:calc(100dvh - var(--header-height) - 130px);background:#fff;border:1px solid #e5e9ef;border-radius:12px;box-shadow:0 6px 25px rgba(0,0,0,.18);z-index:10001;overflow:hidden}
#feature-panel.vegetation-attribute-panel .panel-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:12px 10px;background:#f8f9fa;border-bottom:1px solid #e5e9ef}
#feature-panel.vegetation-attribute-panel .panel-header h3{margin:0;font-size:14px;font-weight:700;display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap}
#feature-panel.vegetation-attribute-panel .panel-close{flex:0 0 24px;width:24px;height:24px}
#feature-panel.vegetation-attribute-panel .panel-content{min-height:0;overflow:auto;padding:14px;overscroll-behavior:contain}
#feature-panel.vegetation-attribute-panel .feature-attributes-list{margin:0}
@media (max-width:760px){
 #feature-panel.vegetation-attribute-panel{left:36px;top:calc(var(--header-height) + 8px);width:260px;max-width:calc(100vw - 56px);max-height:calc(100dvh - var(--header-height) - var(--mobile-controls-clearance,104px) - 16px)}
}

:root{
 --vegetation-blue:#0057a5;
 --primary:var(--vegetation-blue);
 --primary-color:var(--vegetation-blue);
 --bs-link-color:var(--vegetation-blue);
 --bs-link-hover-color:var(--vegetation-blue);
 --bs-link-color-rgb:0,87,165;
 --bs-link-hover-color-rgb:0,87,165;
 --vegetation-panel-bottom:max(44px,var(--mobile-controls-clearance,0px));
 --vegetation-shared-panel-space:max(0px,calc(100dvh - var(--header-height) - 18px - var(--vegetation-panel-bottom) - 12px));
}
/* Reserve the legend's area regardless of which toolbar panel is open. */
#legend-panel{width:220px;height:min(350px,calc(var(--vegetation-shared-panel-space) * .45))!important;min-height:min(100px,calc(var(--vegetation-shared-panel-space) * .45));top:auto!important;bottom:var(--vegetation-panel-bottom)!important;max-height:min(350px,calc(var(--vegetation-shared-panel-space) * .45))!important;overflow:hidden}
#legend-panel .panel-content{max-height:none!important;min-height:0;flex:1 1 auto;overflow-y:auto;scrollbar-gutter:stable;overflow-anchor:none}
body:has(:is(#feature-panel,#layer-panel,#basemap-panel):not([hidden])):has(#legend-panel:not([hidden])) :is(#feature-panel.vegetation-attribute-panel,#layer-panel,#basemap-panel):not([hidden]){
 top:calc(var(--header-height) + 18px)!important;bottom:auto!important;min-height:0!important;
 max-height:calc(var(--vegetation-shared-panel-space) * .55)!important;
}
@media (min-width:540px) and (max-height:520px){
 body:has(:is(#feature-panel,#layer-panel,#basemap-panel):not([hidden])):has(#legend-panel:not([hidden])) :is(#feature-panel.vegetation-attribute-panel,#layer-panel,#basemap-panel):not([hidden]){
  left:36px!important;right:auto!important;width:260px!important;min-width:0!important;
  max-height:calc(var(--vegetation-shared-panel-space) + 12px)!important;
 }
 #legend-panel{
  top:calc(var(--header-height) + 18px)!important;left:308px!important;right:auto!important;
  width:calc(100vw - 316px)!important;max-width:300px!important;min-width:0!important;
  height:min(350px,calc(var(--vegetation-shared-panel-space) + 12px))!important;
  min-height:min(100px,calc(var(--vegetation-shared-panel-space) + 12px));
  max-height:min(350px,calc(var(--vegetation-shared-panel-space) + 12px))!important;
 }
}
#legend-panel .legend-list{gap:2px}
#legend-panel .legend-item{background:transparent;border:0;border-radius:0;padding:4px 2px;gap:8px}
#legend-panel .vegetation-qgis-legend{padding:3px 0;border-bottom:1px solid #edf0f3}
#legend-panel .vegetation-qgis-legend summary{font-weight:600;line-height:1.4;padding:6px 2px}
#legend-panel .vegetation-qgis-legend summary:hover{background:#f3f6fa}
#legend-panel .vegetation-qgis-legend summary:focus-visible{outline:2px solid #a4bce5;outline-offset:-2px}
#legend-panel .vegetation-qgis-legend .legend-list{margin:2px 0 4px 10px}
#legend-panel .legend-label{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.4}
#legend-panel .legend-symbol{width:28px;min-height:20px;height:auto;flex:0 0 28px}
#legend-panel .legend-symbol img{display:block;max-width:28px;height:auto;object-fit:contain}
#legend-panel .vegetation-legend-single{padding:8px 2px;border-bottom:1px solid #edf0f3}
#legend-panel .vegetation-legend-single .legend-label{font-weight:600;color:var(--vegetation-blue)}
#legend-panel .vegetation-legend-description{display:block;font-weight:400;color:#526780}
#feature-panel.vegetation-attribute-panel .feature-attribute-row{padding:4px 0;border-bottom:1px solid #e9ecef}
.vegetation-cadastre-symbol{display:inline-block;flex:0 0 22px;height:16px;border:1px solid rgba(101,113,125,.78);margin-right:8px}

/* Compact mobile toolbar: preserve the original arrows and grouped tools. */
@media (max-width:760px), (max-height:520px) and (orientation:landscape){
 #floating-toolbar{left:0;right:0;width:296px;max-width:calc(100% - 16px);margin:0 auto;transform:none}
 #floating-toolbar.is-visible{animation:none}
 #floating-toolbar #tools-list{flex:1 1 0;min-width:0;justify-content:space-between;gap:2px;padding:0 4px}
 #floating-toolbar #tools-list .tool-item{flex:0 0 48px;min-width:44px;padding:3px 2px}
 #floating-toolbar .nav-button{display:flex;width:32px;height:32px;flex:0 0 32px}
 #floating-toolbar .separator{display:none}
}

/* Slim panel scrollbars; preserve native wheel, keyboard and touch scrolling. */
:is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content{scrollbar-width:thin;scrollbar-color:#b6c0cc transparent}
@supports selector(::-webkit-scrollbar){
 :is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content{scrollbar-width:auto;scrollbar-color:auto}
}
:is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content::-webkit-scrollbar{width:4px;height:4px}
:is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content::-webkit-scrollbar-track{background:transparent}
:is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content::-webkit-scrollbar-thumb{background:#b6c0cc;border-radius:4px}
:is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content::-webkit-scrollbar-thumb:hover{background:#8799ae}
:is(#layer-panel,#legend-panel,#basemap-panel,#info-panel,#feature-panel) .panel-content::-webkit-scrollbar-button{display:none;width:0;height:0}

#legend-panel .vegetation-intention-info{float:right;width:24px;height:22px;margin-left:6px}
#legend-panel summary:has(>.vegetation-intention-info){display:grid;grid-template-columns:8px minmax(0,1fr) 24px;align-items:center;column-gap:4px;list-style:none}
#legend-panel summary:has(>.vegetation-intention-info)::before{content:'';width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:5px solid currentColor;justify-self:center}
#legend-panel details[open]>summary:has(>.vegetation-intention-info)::before{transform:rotate(90deg)}
#legend-panel summary:has(>.vegetation-intention-info)::-webkit-details-marker{display:none}
#legend-panel .vegetation-legend-title{min-width:0;overflow-wrap:anywhere}
#legend-panel .vegetation-campaign-title{font-size:11.5px}
#legend-panel summary>.vegetation-intention-info{float:none;margin:0}

#intention-info-dialog .modal-header{position:sticky;top:0;z-index:1}
:is(#intention-info-dialog,#info-panel) .vegetation-campaign-definitions{margin:16px 0 0}
:is(#intention-info-dialog,#info-panel) .vegetation-campaign-definitions dt{margin-top:12px;font-weight:600;color:var(--vegetation-blue)}
#intention-info-dialog .vegetation-campaign-definitions dt{font-size:16px;line-height:1.4;font-weight:800;font-family:'PP Fragment',Georgia,serif}
:is(#intention-info-dialog,#info-panel) .vegetation-campaign-definitions dd{margin:4px 0 0}
#info-panel .info-section{font-size:12px;line-height:1.5}
#info-panel .info-section :is(p,h4,dl,dt,dd){font-family:inherit;font-size:inherit;line-height:inherit}
#info-panel .info-section :is(h4,dt){font-weight:700}
#info-panel .info-section dt{color:inherit}
@media (max-width:760px){#info-panel .info-section{font-size:13px;line-height:1.35}}


#intention-info-dialog .vegetation-plan-intro{margin:16px 0}
#intention-info-dialog .vegetation-plan-definitions dd{white-space:normal}

/* Interface brand accents; cartographic symbols retain their source colors. */
body{color:var(--vegetation-blue)}
a{color:var(--vegetation-blue)}
.tool-panel .panel-header h3 i,#feature-panel .panel-header h3 i,.feature-info-panel .popup-header h3 i,
.feature-attribute-row dt,.feature-attribute-row dd,.feature-popup-member h4,
#floating-toolbar .nav-button,.ol-attribution button{color:var(--vegetation-blue)}
#floating-toolbar .toolbar-container{background:var(--vegetation-blue)!important}
#floating-toolbar{--secondary:#66a2a7}
#toolbar-toggle-btn,#toolbar-toggle-btn:hover,#toolbar-toggle-btn:focus,#toolbar-toggle-btn:active{background:var(--vegetation-blue)!important}
