* { box-sizing: border-box; }
html, body { margin: 0; font-family: "Open Sans", system-ui, sans-serif; font-size: 14px; background: #f4f5f7; color: #1d2330; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 12px; background: #1d2330; color: #fff; }
.toolbar label { display: flex; gap: 6px; align-items: center; min-width: 0; max-width: 100%; }
.toolbar select, .toolbar button { font: inherit; padding: 4px 8px; }
.toolbar select { min-width: 0; max-width: 100%; flex: 1 1 auto; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }

/* Block page pinch-zoom (the map still zooms: the OL viewport has its own touch-action) */
html, body { touch-action: pan-x pan-y; overflow-x: hidden; }
.flags { position: relative; }
.flags summary { cursor: pointer; }
.flags #flags { position: absolute; z-index: 1000; top: 28px; left: 0; background: #fff; color: #1d2330; padding: 8px 12px; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.25); min-width: 260px; }
.flags #flags label { display: flex; gap: 6px; padding: 2px 0; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; padding: 12px; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; } .log-column { max-height: 40vh; } }

.map-column { display: flex; flex-direction: column; gap: 8px; }
.map { position: relative; width: 100%; height: 65vh; min-height: 320px; background: #ccc; }
.help-tag { padding: 8px 12px; background: #fff8e1; border-left: 4px solid #f9a825; }
.help-tag:empty { display: none; }

.consumer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; }
.area { font-size: 16px; font-weight: 600; }
.actions { display: flex; gap: 8px; }
.actions button { font: inherit; padding: 10px 16px; border-radius: 6px; border: 1px solid #b0b7c3; background: #fff; }
.actions button.primary { background: #1e6f3f; color: #fff; border-color: #1e6f3f; }
.feedback { padding: 10px 12px; background: #fdecea; color: #8a1c1c; border-left: 4px solid #d32f2f; }
.feedback.ok { background: #e8f5e9; color: #1b5e20; border-left-color: #2e7d32; }

.log-column { background: #fff; padding: 8px 12px; overflow: auto; max-height: calc(100vh - 80px); }
.log-column h2 { font-size: 14px; margin: 4px 0 8px; }
.log { list-style: none; margin: 8px 0 0; padding: 0; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.log li { padding: 4px 0; border-bottom: 1px solid #eee; word-break: break-all; }
.log li.error { color: #c62828; }
.log li.event { color: #1565c0; }

/* Component tooltip (approximation of the host theme CSS) */
.tooltip { position: absolute; display: none; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.3); pointer-events: none; }
.tooltip p { margin: 0; }
