/* The link window (netmap-link.js): a radio link laid out the way UISP shows one -- the two ends at the top with
   their gauges, then each end's air, signal, rate, charts and details side by side. */
:root {
  --ln-blue: #1f78e0; --ln-teal: #1fb59b; --ln-track: #e5e9f0; --ln-other: #aab4c5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ln-blue: #4f9cff; --ln-teal: #2dd4bf; --ln-track: #262e44; --ln-other: #4d5875; }
}
:root[data-theme="dark"] { --ln-blue: #4f9cff; --ln-teal: #2dd4bf; --ln-track: #262e44; --ln-other: #4d5875; }

.ln-win .dlg-h { align-items: center; }
.ln-head { flex: 1; min-width: 0; }
.ln-head .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ln-blue); }
.ln-head h2 { margin: 2px 0 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ln-b { padding: 14px 22px 24px; container-type: inline-size; }
.ln-embed { container-type: inline-size; }
#dlg .nl-obj-b .insp-in > .ant-link { column-span: all; }
.ln-embed > h3 small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.ln-win .num { font-variant-numeric: tabular-nums; }
.ln-win .calc { color: var(--muted); }
.ln-win .bad { color: var(--red); }

/* the bar: the other end, the period, what the charts show */
.ln-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.ln-other { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ln-other select { min-height: 34px; max-width: min(340px, 70vw); padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.ln-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.ln-seg button { min-height: 32px; padding: 0 14px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ln-seg button + button { border-left: 1px solid var(--line); }
.ln-seg button.on { background: var(--ln-blue); color: #fff; }
.ln-seg button:focus-visible, .ln-win .lnk:focus-visible { outline: 2px solid var(--ln-blue); outline-offset: 2px; }
.ln-upd { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.ln-b > .note-row { margin-bottom: 12px; }

/* the top: an end, its gauge, the link between them, the other gauge, the other end */
.ln-top { display: grid; grid-template-columns: minmax(0, 1fr) 132px minmax(210px, 1.25fr) 132px minmax(0, 1fr);
  grid-template-areas: "dl gl mid gr dr"; align-items: center; gap: 14px 18px; padding: 8px 0 20px; border-bottom: 1px solid var(--line); }
.ln-dev { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ln-dev.l { grid-area: dl; } .ln-dev.r { grid-area: dr; flex-direction: row-reverse; text-align: right; }
.ln-dev > div { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.ln-dev.r > div { justify-items: end; }
.ln-pic { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-muted); }
.ln-pic svg { width: 32px; height: 32px; }
.ln-eye { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.ln-dev .lnk { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: inherit; cursor: pointer; }
.ln-dev .lnk b { font-size: 15.5px; }
.ln-dev .lnk:hover b { color: var(--ln-blue); }
.ln-dev small { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ln-dev .chip { min-height: 22px; padding: 0 8px; font-size: 11.5px; }
.ln-dev .chip.ok { color: var(--green); background: var(--green-bg); border-color: transparent; }
.ln-dev .chip.warn { color: var(--amber); background: var(--amber-bg); border-color: transparent; }

.ln-gauge { position: relative; width: 132px; height: 132px; justify-self: center; }
.ln-gauge.l { grid-area: gl; } .ln-gauge.r { grid-area: gr; }
.ln-gauge svg { display: block; width: 100%; height: 100%; }
.ln-g-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; line-height: 1.15; }
.ln-g-in span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.ln-g-in small { font-size: 9.5px; color: var(--muted); }
.ln-g-in b { margin-top: 2px; font-size: 23px; font-weight: 700; color: var(--ln-blue); }
.ln-gauge.calc .ln-g-in b { color: var(--muted); }

.ln-mid { grid-area: mid; display: grid; gap: 8px; min-width: 0; }
.ln-ssid { font-size: 12px; text-align: center; color: var(--muted); }
.ln-ssid b { color: var(--text); }
.ln-line { position: relative; display: grid; place-items: center; height: 30px; }
.ln-line::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 2px solid var(--text-2); }
.ln-line i { position: absolute; top: 50%; width: 0; height: 0; border: 6px solid transparent; translate: 0 -50%; }
.ln-line i.l { left: 0; border-left-width: 0; border-right-color: var(--text-2); }
.ln-line i.r { right: 0; border-right-width: 0; border-left-color: var(--text-2); }
.ln-dist { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 8px; background: var(--text); color: var(--panel); font-size: 13.5px; }
.ln-q { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 18px; }
.ln-q div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; font-size: 12.5px; }
.ln-q span { font-weight: 600; color: var(--text-2); }
.ln-q i { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--green) var(--v), var(--ln-track) var(--v)); }
.ln-verdict { font-size: 12.5px; font-weight: 600; text-align: center; }
.ln-verdict.ok { color: var(--green); } .ln-verdict.warn { color: var(--amber); } .ln-verdict.bad { color: var(--red); }

/* each end: its air, signal, rate, charts and details */
.ln-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; }
.ln-side { display: grid; align-content: start; gap: 18px; min-width: 0; }
.ln-cap { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--muted); }
.ln-cap::before, .ln-cap::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.ln-cap span { max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-block { display: grid; gap: 6px; }
.ln-lbl { font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--text-2); }
.ln-sub { font-weight: 500; color: var(--muted); }
.ln-big { margin: 0 2px; font-size: 17px; color: var(--text); }
.ln-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ln-note { margin: 0; font-size: 12px; color: var(--muted); }
.ln-none { padding: 6px 0; font-size: 12.5px; color: var(--muted); }

.ln-air { position: relative; padding-bottom: 36px; }
.ln-air svg { display: block; width: 100%; height: 34px; }
.ln-ch { position: absolute; top: 36px; translate: -50% 0; font-size: 12.5px; line-height: 1.25; text-align: center; white-space: nowrap; }
.ln-ch small { display: block; font-size: 11px; color: var(--muted); }
.ln-air-ax { position: absolute; left: 0; right: 0; top: 36px; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); pointer-events: none; }

.ln-meter { position: relative; height: 10px; border-radius: 5px; background: var(--ln-track); }
.ln-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ln-blue); }
.ln-meter i.fair { background: #f59e0b; } .ln-meter i.poor { background: var(--red); }
.ln-meter s { position: absolute; top: -4px; bottom: -4px; width: 2px; translate: -1px 0; background: var(--text-2); }
.ln-meter-ax { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); }

.ln-mods { display: grid; gap: 2px; }
.ln-mods span { position: relative; padding: 5px 0 7px; background: var(--ln-track); color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.ln-mods span:first-child { border-radius: 4px 0 0 4px; } .ln-mods span:last-child { border-radius: 0 4px 4px 0; }
.ln-mods span.on { background: var(--ln-teal); color: #fff; }
.ln-mods span.want::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ln-blue); }

.ln-chart { position: relative; }
.ln-chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.ln-tip { position: absolute; top: 4px; z-index: 2; display: grid; gap: 2px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-elevated); box-shadow: var(--shadow-sm); font-size: 12px; white-space: nowrap; pointer-events: none; }
.ln-tip small { color: var(--muted); }
.ln-tip i, .ln-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.ln-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-2); }
.ln-legend i.dash { height: 2px; vertical-align: 3px; background: repeating-linear-gradient(90deg, var(--muted-2) 0 4px, transparent 4px 7px); }

.ln-det { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.ln-det dl { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 6px 10px; margin: 0; font-size: 12.5px; }
.ln-det h4 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 11.5px; letter-spacing: .05em; color: var(--muted); }
.ln-det dt { color: var(--muted); }
.ln-det dd { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0; text-align: right; overflow-wrap: anywhere; }
.ln-pct { width: 54px; height: 5px; border-radius: 3px; background: var(--ln-track); overflow: hidden; }
.ln-pct i { display: block; height: 100%; background: var(--ln-blue); }

/* a part of an antenna's window: the gauges a little smaller, the middle's bars one under the other */
@container (max-width: 1120px) {
  .ln-top { grid-template-columns: minmax(0, 1fr) 112px minmax(180px, 1.1fr) 112px minmax(0, 1fr); gap: 12px; }
  .ln-gauge { width: 112px; height: 112px; }
  .ln-g-in b { font-size: 20px; }
  .ln-q { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@container (max-width: 940px) {
  .ln-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "dl dr" "gl gr" "mid mid"; }
  .ln-cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 560px) { .ln-b { padding: 12px 14px 20px; } }
@container (max-width: 560px) {
  .ln-dev, .ln-dev.r { flex-direction: column; align-items: center; text-align: center; }
  .ln-dev > div, .ln-dev.r > div { justify-items: center; }
  .ln-gauge { width: 118px; height: 118px; }
  .ln-g-in b { font-size: 20px; }
  .ln-det { grid-template-columns: minmax(0, 1fr); }
  .ln-upd { margin-left: 0; }
}

/* the frequencies page: a row's buttons */
.fq-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* the link in one line: folded in a company's window, the head of it when open */
.ln-sum { display: grid; grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px 28px; cursor: pointer; }
.ln-sum-id { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.ln-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px 18px; min-width: 0; }
.ln-go { font-size: 24px; line-height: 1; color: var(--muted); }
.ln-sum.go:hover .ln-go { color: var(--ln-blue); }
.ln-sum.open { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.ln-fold { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ln-chev { display: inline-block; color: var(--muted); transition: rotate .15s; }
.ln-fold[aria-expanded="true"] .ln-chev { rotate: 90deg; }
.ln-names { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13.5px; color: var(--muted); }
.ln-names .lnk { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ln-blue); font: inherit; cursor: pointer; }
.ln-names .lnk b { font-weight: 600; }
.ln-names .lnk:hover b { text-decoration: underline; }
.ln-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ln-dot.ok { background: var(--green); } .ln-dot.warn { background: var(--amber); }
.ln-k { display: inline-grid; line-height: 1.2; }
.ln-k small { font-size: 10.5px; color: var(--muted); }
.ln-k b { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.ln-more { font-size: 12.5px; font-weight: 600; color: var(--ln-blue); }
.ln-fold:focus-visible, .ln-names .lnk:focus-visible { outline: 2px solid var(--ln-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ln-chev { transition: none; } }

/* a company's window: the whole line leads to its antenna's window */
.ln-sum.go { margin: -8px -10px; padding: 8px 10px; border-radius: 10px; transition: background .12s; }
.ln-sum.go:hover { background: var(--panel-muted); }
.ln-sum.go:focus-visible { outline: 2px solid var(--ln-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ln-sum.go { transition: none; } }

/* narrow: the names over the figures */
@container (max-width: 760px) { .ln-sum { grid-template-columns: minmax(0, 1fr) auto; } .ln-figs { grid-column: 1 / -1; grid-row: 2; } }
