/* burnmanager Layout (/app/layout/): the plan of the camp to scale. Loaded on that page only, after app-ui.css.
   The drawing is one svg; everything on it takes its colour from the group it belongs to (sleeping, vehicles, camp,
   power and water, safety). Hard corners like the rest of the app, no glow, nothing that moves by itself. */
.lay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lay-main { min-width: 0; display: grid; gap: 10px; align-content: start; }
.lay-side { min-width: 0; display: grid; gap: 14px; align-content: start; }
.lay-side .ui-card { margin: 0; }
.lay-side .ui-h2 { font-size: 19px; }
.lay-start { max-width: 640px; }

/* the bar above the plan */
.lay-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lay-bar .ui-btn { gap: 8px; }
.lay-tool {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--ui-raised); color: var(--ui-ink); border: 1px solid var(--ui-edge);
}
.lay-tool svg { width: 20px; height: 20px; }
.lay-tool:hover { border-color: var(--ui-fire); }
.lay-tool:disabled { opacity: .4; cursor: default; border-color: var(--ui-edge); }
.lay-tool:focus-visible, .lay-pal-b:focus-visible, .lay-check:focus-visible { outline: 2px solid var(--ui-fire); outline-offset: 2px; }
.lay-gap { flex: 1 1 8px; }
.lay-state { margin: 0 0 0 6px; font-size: 13px; color: var(--ui-faint); min-width: 92px; text-align: end; }

/* what you can put on the plan */
.lay-pal { display: grid; gap: 14px; padding: 16px; }
.lay-pal-g h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ui-dim); }
.lay-pal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lay-pal-b {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: start;
  padding: 9px 10px; min-height: 52px; cursor: pointer; background: var(--ui-raised); color: var(--ui-ink); border: 1px solid var(--ui-edge); font: inherit;
}
.lay-pal-b:hover { border-color: var(--ui-fire); }
.lay-pal-b b { font-size: 14.5px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.lay-pal-b small { grid-column: 2; font-size: 12.5px; color: var(--ui-faint); }
.lay-pal-i { grid-row: span 2; width: 20px; height: 20px; background: var(--lk-f); box-shadow: inset 0 0 0 1.5px var(--lk); }
.lay-pal-i.round { border-radius: 50% !important; }

/* the plan itself */
.lay-stage {
  position: relative; height: clamp(320px, 62svh, 640px); overflow: hidden; touch-action: none; cursor: grab;
  background: var(--lay-out); border: 1px solid var(--ui-edge); -webkit-user-select: none; user-select: none;
}
.lay-stage:active { cursor: grabbing; }
.lay-stage:focus-visible { outline: 2px solid var(--ui-fire); outline-offset: 2px; }
#lay-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#lay-svg text { font-family: inherit; fill: var(--ui-ink); pointer-events: none; }
.sk-stage { display: block; height: clamp(320px, 62svh, 640px); }
.lay-hint { margin: 0; }

body.ui { --lay-out: #0E0418; --lay-plot: #1B0F28; --lay-grid: rgba(242, 237, 227, .06); --lay-grid-b: rgba(242, 237, 227, .14); --lay-street: rgba(217, 132, 63, .16); --lay-edge: #F2EDE3; }
body.ui:not(.night) { --lay-out: #EFEFF2; --lay-plot: #FFFFFF; --lay-grid: rgba(17, 17, 20, .06); --lay-grid-b: rgba(17, 17, 20, .14); --lay-street: rgba(217, 132, 63, .2); --lay-edge: #111114; }
.lay-plot { fill: var(--lay-plot); }
.lay-street { fill: var(--lay-street); }
.lay-grid { fill: none; stroke: var(--lay-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lay-grid.bold { stroke: var(--lay-grid-b); }
.lay-edge { fill: none; stroke: var(--lay-edge); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
#lay-svg .lay-dim { fill: var(--ui-dim); font-weight: 500; }
#lay-svg .lay-dim.st { fill: var(--ui-acc-ink, var(--ui-fire)); font-weight: 600; }

/* a colour per group: the line (--lk) and the fill (--lk-f) */
.lk-sleep { --lk: #8FB3D9; --lk-f: rgba(143, 179, 217, .26); }
.lk-veh { --lk: #B9A27C; --lk-f: rgba(185, 162, 124, .28); }
.lk-camp { --lk: #9CC69B; --lk-f: rgba(156, 198, 155, .24); }
.lk-svc { --lk: #E6B95C; --lk-f: rgba(230, 185, 92, .3); }
.lk-safe { --lk: #E58C8A; --lk-f: rgba(229, 140, 138, .28); }
body.ui:not(.night) .lk-sleep { --lk: #3F78B5; --lk-f: rgba(63, 120, 181, .16); }
body.ui:not(.night) .lk-veh { --lk: #8A6F3F; --lk-f: rgba(138, 111, 63, .18); }
body.ui:not(.night) .lk-camp { --lk: #3F8C4A; --lk-f: rgba(63, 140, 74, .15); }
body.ui:not(.night) .lk-svc { --lk: #B07F12; --lk-f: rgba(176, 127, 18, .18); }
body.ui:not(.night) .lk-safe { --lk: #C2483F; --lk-f: rgba(194, 72, 63, .14); }
.lo { cursor: pointer; }
.lo-s { fill: var(--lk-f); stroke: var(--lk); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.lo-shade .lo-s { fill: rgba(156, 198, 155, .07); stroke-dasharray: 7 5; }
.lo-public .lo-s { fill: rgba(217, 132, 63, .13); stroke: var(--ui-fire); stroke-dasharray: 3 4; }
.lo-lane .lo-s { fill: rgba(242, 237, 227, .07); stroke: var(--ui-dim); stroke-dasharray: 10 6; }
body.ui:not(.night) .lo-lane .lo-s { fill: rgba(17, 17, 20, .05); }
.lo-extinguisher .lo-s { fill: var(--ui-warn); stroke: var(--ui-warn); }
#lay-svg .lo-extinguisher .lo-t { fill: #fff; font-weight: 700; }
#lay-svg .lo-t { font-weight: 500; }
.lo.tip .lo-s { stroke: var(--ui-mid, #E7B45A); stroke-width: 2.6; }
.lo.rule .lo-s { stroke: var(--ui-warn); stroke-width: 2.6; }
.lay-ring { fill: none; stroke: var(--ui-warn); stroke-width: 1; stroke-dasharray: 5 5; opacity: .45; vector-effect: non-scaling-stroke; }
#lay-svg .lay-ring-t { fill: var(--ui-warn); opacity: .8; }
#lay-svg .lo-cap { fill: var(--ui-dim); font-weight: 600; }
#lay-svg .lo-side { fill: var(--ui-dim); }
.lay-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ui-dim); }
.lay-legend i { display: inline-block; width: 11px; height: 11px; margin-inline-end: 6px; vertical-align: -1px; background: var(--lk-f); box-shadow: inset 0 0 0 1.5px var(--lk); }
.lay-sel-box { fill: none; stroke: var(--ui-fire); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.lay-sel-stem { stroke: var(--ui-fire); stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none; }
.lay-h { fill: var(--ui-fire); stroke: var(--lay-plot); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: grab; }

/* Today: the plan small, as the way in */
.lay-mini { display: block; margin: 14px 0 10px; background: var(--lay-out); border: 1px solid var(--ui-edge); }
.lay-mini[hidden] { display: none; }
.lay-mini svg { display: block; width: 100%; height: auto; max-height: 320px; }
.lay-mini .lo { cursor: inherit; }
.lay-mini:hover, .lay-mini:focus-visible { border-color: var(--ui-fire); outline: none; }
.lay-home-go { margin: 10px 0 0; font-size: 14.5px; font-weight: 600; }
.lay-home-go a { color: var(--ui-ink); text-underline-offset: 3px; }

/* the panels next to the plan */
.lay-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.lay-list:empty { display: none; }
.lay-check {
  width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; text-align: start;
  padding: 9px 0; background: none; border: 0; border-top: 1px solid var(--ui-line); color: var(--ui-ink); font: inherit; font-size: 14.5px; line-height: 1.4; cursor: pointer;
}
.lay-list li:first-child .lay-check { border-top: 0; }
.lay-check:hover span { text-decoration: underline; text-underline-offset: 3px; }
.lay-dot { width: 9px; height: 9px; margin-top: 6px; background: var(--ui-warn); }
.lay-check.tip .lay-dot { background: var(--ui-mid, #E7B45A); }
.lay-src { margin-top: 12px; }
.lay-src a { color: inherit; text-underline-offset: 3px; }
.lay-person, .lay-ver { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--ui-line); }
.lay-list li:first-child.lay-person, .lay-list li:first-child.lay-ver { border-top: 0; }
.lay-person-t { flex: 1 1 120px; min-width: 0; display: grid; }
.lay-person-t b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.lay-person-t small { font-size: 13px; color: var(--ui-faint); }
.lay-note { font-size: 14px; color: var(--ui-dim); padding: 8px 0; }
.lay-note a { color: var(--ui-ink); text-underline-offset: 3px; }
.lay-streets { border: 0; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.lay-streets legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--ui-dim); font-weight: 500; }
.lay-info .ui-sub { margin-top: 4px; }
#lay-keep { margin-top: 12px; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }

/* a laptop: this is a work screen, so the plan fits in one view (the user, 14 Nov 2026: "alles in 1 beeld op desktop").
   The head of the page is one line, the plan takes the height that is left and stays in view, the panels scroll next to
   it and use the whole width. */
@media (min-width: 1100px) {
  body.ui[data-view="layout"] .ui-main { max-width: 1560px; }
  body.ui[data-view="layout"][data-view] #app-body { max-width: none; }
  body.ui[data-view="layout"] .ui-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 14px; }
  body.ui[data-view="layout"] .ui-date { display: none; }
  body.ui[data-view="layout"] .ui-title { margin: 0; font-size: 34px; }
  body.ui[data-view="layout"] .ui-lead { margin: 0; font-size: 15px; flex: 1 1 320px; }
  .lay { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .lay-main { position: sticky; top: 12px; }
  .lay-stage, .sk-stage { height: clamp(340px, calc(100svh - 200px), 1100px); }
  .lay-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
  .lay-legend { flex: none; }
  .lay-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
@media (max-width: 700px) {
  .lay-pal-list { grid-template-columns: 1fr 1fr; }
  .lay-tool[data-do="zin"], .lay-tool[data-do="zout"] { display: none; }   /* two fingers zoom */
  .lay-state { min-width: 0; margin: 0; }
  .lay-hint { display: none; }
}
@media print { .lay-bar, .lay-pal, .lay-side, .lay-hint { display: none !important; } }
