/* SKY.TUTI.LT — GeoLab (round 24): OpenLayers + WebODM connector page.
   Standalone layout on the guide.css theme; the map fills the viewport and
   the control panel is a scrollable side rail that becomes a top sheet on
   phones. */
.gl-tag {
  margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: var(--acc); border: 1px solid var(--line2); border-radius: 999px;
  padding: 2px 9px; background: var(--panel2);
}
.gl-wrap { position: relative; height: calc(100vh - 58px); min-height: 380px; }
/* Flex column layout: the map area self-fits whatever height the sticky
   header takes (it wraps to two rows on phones, so a fixed 58px offset
   left ~33px of page scroll — the flex column removes that). */
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.gl-wrap { flex: 1 1 auto; min-height: 0; height: auto; }
.gl-map { position: absolute; inset: 0; background: #05070c; }
.gl-map:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }

/* Control panel */
.gl-panel {
  position: absolute; z-index: 20; top: 12px; left: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100% - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(17,21,31,.96); border: 1px solid var(--line2); border-radius: 14px;
  box-shadow: 0 10px 34px rgba(0,0,0,.5);
  padding: 14px 16px 16px;
  -webkit-overflow-scrolling: touch;
}
.gl-panel.hidden { display: none; }
.gl-title { margin: 0 0 4px; font-size: 19px; letter-spacing: -.2px; }
.gl-sub { margin: 0 0 12px; font-size: 12.5px; color: var(--txt2); line-height: 1.5; }
.gl-sect { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.gl-sect:first-of-type { border-top: 0; margin-top: 0; }
.gl-sect h2 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--txt2); }
.gl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gl-note { margin: 0 0 8px; font-size: 12px; color: var(--txt3); line-height: 1.5; }
.gl-lab { display: block; font-size: 12px; color: var(--txt2); margin: 8px 0 0; }
.gl-lab .dim { color: var(--txt3); font-weight: 400; }
.gl-lab input {
  display: block; width: 100%; margin-top: 4px; height: 34px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2);
  color: var(--txt); font-size: 13px;
}
/* iOS auto-zooms when focusing inputs below 16px — typeable fields are 16px */
@media (max-width: 860px) {
  .gl-lab input { font-size: 16px; }
}
.gl-readout {
  margin-top: 8px; font-size: 12px; color: var(--txt2); line-height: 1.5;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 9px; min-height: 32px; word-break: break-word;
}
.gl-readout:empty { display: none; }
.gl-readout.ok { border-color: #2e5b3e; color: #b8e6c8; }
.gl-readout.err { border-color: #6b2d2d; color: #ffb3b3; }
.gl-projects { margin-top: 8px; }
.gl-proj { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.gl-proj h3 { margin: 0 0 4px; font-size: 13px; }
.gl-proj .gl-meta { font-size: 11.5px; color: var(--txt3); }
.gl-task { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); margin-top: 6px; }
.gl-task:first-of-type { border-top: 0; margin-top: 0; }
.gl-task .tname { font-size: 12.5px; flex: 1 1 100%; }
.gl-task .tstat { font-size: 11px; color: var(--txt3); }
.st-done { color: #7fd4a8; } .st-fail { color: #ff9c9c; } .st-run { color: #f5c66d; }
.gl-layers { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.gl-layer { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.gl-layer .lname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-layer button { flex: 0 0 auto; }
.gl-foot { margin: 14px 0 2px; font-size: 11px; color: var(--txt3); line-height: 1.5; }

/* Buttons (mirror guide.css .pbtn, plus active state) */
.pbtn.small.active { background: var(--acc); border-color: var(--acc); color: #06121f; }

/* Panel collapse */
body.gl-nopanel .gl-panel { display: none; }

/* Mobile: the panel becomes a top sheet over the map, capped so the map and
   its zoom controls stay usable; header pills shrink to fit 360px screens.
   (Map height needs no offset here — the flex column above self-fits.) */
@media (max-width: 640px) {
  .gl-panel { top: 8px; left: 8px; width: calc(100vw - 16px); max-height: 46vh; }
  .g-back { height: 30px; padding: 0 10px; font-size: 12px; }
}
