[v-cloak] {
  display: none !important;
}

.overlay {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: white;
}

main {
  overflow-x: visible !important;
}

body:has(dialog[open])::after {
  content: '';
  position: absolute;
  z-index: 1049;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  backdrop-filter: blur(10px);
}

dialog {
  z-index: 1050;
  padding: 15px;
  max-height: 80vh;
  width: 750px;
}

.tooltip {
  position: absolute;
  z-index: 1010;
}

.tooltip a {
  text-decoration: underline !important;
}

.actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.dual-pane {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  /* max-height: 100vh; */
  gap: 10px;
}

#map {
  width: 100%;
  min-width: 400px;
  height: 400px;

}

.dual-pane fieldset {
  margin-block-start: 0;
}

.field {
  margin-block-end: 0.5rem;
}

.byte-counter {
  font-size: 0.85em;
}

.console-output {
  background: #0d0d0d !important;
  color: #ccc !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  padding: 0.75em !important;
  border-radius: 0.25rem !important;
  height: 400px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.console-output * {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
}

.console-cmd {
  color: #7cb3ff !important;
}

.console-reply {
  color: #ccc !important;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.console-error {
  color: #ff6b6b !important;
}

.console-input-line {
  display: flex !important;
  align-items: center !important;
  margin-top: 0.25em !important;
  width: 100%;
  cursor: text;
}

.console-prompt {
  color: #7cb3ff !important;
  flex-shrink: 0;
}

.console-input-line input {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  color: #7cb3ff !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
}

.console-ghost {
  color: #555 !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 13px !important;
  pointer-events: none;
  white-space: pre;
}

.console-input-line progress {
  flex-shrink: 0;
  margin-left: 0.5em;
}

@media (max-width: 800px) {
  .dual-pane {
    max-height: none;
  }
  .dual-pane > * {
    width: 100%;
  }
  dialog {
    width: 95%;
    max-height: 100vh;
  }
}

.leaflet-map-pane {
  cursor: crosshair
}

.leaflet-bottom {
  position: absolute !important;
}
.leaflet-control-layers-list {
  margin-block-start: 0 !important;
}
.leaflet-bottom .leaflet-control-layers {
  margin-bottom: 55px !important;
}

/* --- Regions & access control --- */

.region-row,
.acl-row {
  align-items: center;
  gap: 0.5rem;
}

.region-row .field,
.acl-row .field {
  margin-block-end: 0;
}

.acl-row .acl-role {
  min-width: 11rem;
  flex: 0 0 auto;
}

.region-row .region-flood {
  flex: 0 0 auto;
  white-space: nowrap;
}

.mono {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 0.85em !important;
}

/* Fields whose contents are not yet valid to send to the device */
.field input.invalid {
  border-color: var(--error) !important;
  color: var(--error);
}

@media (max-width: 800px) {
  .region-row,
  .acl-row {
    flex-wrap: wrap;
  }
  .acl-row .acl-role {
    min-width: 9rem;
  }
}

/* Beer CSS animates the tooltip with `transition: all`, which would also
   animate the `translate` used to nudge clipped tooltips back into the
   viewport - and re-measuring mid-animation under-corrects the shift.
   Transition only the properties Beer actually needs. */
.tooltip {
  transition-property: opacity, visibility, transform;
}

/* --- Stats dialog --- */

/* The generic 80vh cap cuts the list off on tall monitors; let this one use
   nearly the whole viewport and only scroll when it genuinely has to. */
dialog.stats-dialog {
  max-height: calc(100vh - 2rem);
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.25rem 0;
  transition: opacity var(--speed2);
}

.stats-list.stats-stale {
  opacity: 0.5;
}

.stats-label {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.stats-value {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  line-height: 1.4;
}
