/* MeshBuddy Line-of-Sight tool — tactical glass panel. */

.meshbuddy-los-panel {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 640;
  width: 500px;
  max-width: calc(100vw - 28px);
  color: #dcefe1;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  border: 1px solid rgba(70, 224, 107, .28);
  border-radius: 14px;
  background: rgba(8, 14, 11, .90);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .48);
  -webkit-backdrop-filter: blur(13px) saturate(140%);
  backdrop-filter: blur(13px) saturate(140%);
  overflow: hidden;
}

.meshbuddy-los-panel.is-hidden { display: none; }

.los-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #eafff0;
  border-bottom: 1px solid rgba(70, 224, 107, .18);
  background: rgba(70, 224, 107, .07);
}

.los-title button {
  font: inherit;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  color: #bfeacb;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(70, 224, 107, .28);
  background: rgba(10, 18, 13, .8);
  cursor: pointer;
}

.los-title button:hover { border-color: rgba(70, 224, 107, .55); color: #eafff0; }

.los-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.los-antenna-row {
  display: flex;
  gap: 10px;
}

.los-antenna-row label {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #9fc6ab;
}

.los-antenna-row input {
  font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
  font-size: 14px;
  color: #eafff0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(70, 224, 107, .24);
  background: rgba(4, 9, 6, .7);
}

.los-antenna-row input:focus {
  outline: none;
  border-color: rgba(70, 224, 107, .6);
}

.los-profile {
  border: 1px solid rgba(70, 224, 107, .16);
  border-radius: 10px;
  background: rgba(3, 7, 5, .6);
  padding: 6px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.los-profile-empty {
  font-size: 12px;
  color: #7f9a89;
  text-align: center;
  padding: 24px 12px;
}

.los-svg { width: 100%; height: auto; display: block; }

.los-grid { stroke: rgba(120, 150, 132, .16); stroke-width: 1; }
.los-axis { fill: #7f9a89; font-size: 9px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.los-fresnel { fill: rgba(70, 224, 107, .10); stroke: rgba(70, 224, 107, .28); stroke-width: 1; stroke-dasharray: 3 2; }
.los-ground { fill: rgba(70, 224, 107, .14); }
.los-ground-line { fill: none; stroke: rgba(150, 200, 168, .7); stroke-width: 1.2; }
.los-sight { fill: none; stroke-width: 2.2; }
.los-worst { fill: #ffd166; stroke: #06110c; stroke-width: 1; }

.los-verdict-wrap { display: flex; justify-content: center; }

.los-verdict {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  padding: 5px 18px;
  border-radius: 8px;
  border: 1px solid rgba(140, 160, 148, .3);
  color: #b7c9bd;
  background: rgba(10, 16, 12, .7);
}

.los-verdict.is-clear {
  color: #061109;
  background: #46e06b;
  border-color: #46e06b;
  box-shadow: 0 0 14px rgba(70, 224, 107, .4);
}

.los-verdict.is-blocked {
  color: #fff;
  background: #ff5f67;
  border-color: #ff5f67;
  box-shadow: 0 0 14px rgba(255, 95, 103, .4);
}

.los-readouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.los-readout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid rgba(70, 224, 107, .14);
  background: rgba(4, 9, 6, .55);
}

.los-readout span {
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8fb09c;
}

.los-readout b {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  color: #eafff0;
}

.los-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 10.5px;
  color: #9fc6ab;
}

.los-legend span { display: inline-flex; align-items: center; gap: 6px; }

.los-key {
  display: inline-block;
  width: 16px;
  height: 0;
  border-top-width: 3px;
  border-top-style: solid;
}

.los-key-sight { border-top-color: #46e06b; }
.los-key-fresnel { border-top-style: dashed; border-top-color: rgba(70, 224, 107, .55); }
.los-key-ground { border-top: none; width: 14px; height: 10px; background: rgba(70, 224, 107, .28); border-radius: 2px; }

.los-buttons { display: flex; gap: 8px; }

.los-buttons button {
  flex: 1 1 0;
  font: inherit;
  font-size: 12px;
  color: #cdeed6;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(70, 224, 107, .28);
  background: rgba(10, 18, 13, .8);
  cursor: pointer;
}

.los-buttons button:hover { border-color: rgba(70, 224, 107, .6); color: #eafff0; }

.los-status {
  font-size: 11.5px;
  color: #9fc6ab;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(4, 9, 6, .5);
  border: 1px solid rgba(70, 224, 107, .12);
  min-height: 16px;
}

.los-status.good { color: #8bf0a6; border-color: rgba(70, 224, 107, .3); }
.los-status.warn { color: #ffd58a; border-color: rgba(255, 190, 90, .3); }
.los-status.bad { color: #ff9aa0; border-color: rgba(255, 95, 103, .35); }

/* toolbar toggle active state */
#losTopToggle.los-on {
  border-color: rgba(70, 224, 107, .6) !important;
  color: #eafff0 !important;
  box-shadow: 0 0 10px rgba(70, 224, 107, .3);
}

@media (max-width: 640px) {
  .meshbuddy-los-panel {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
  }
}
