/* D80 IP- und AS-Lookup — Stil des Werkzeugs, auf den Tokens der Site:
   folgt damit dem Theme-Umschalter (data-theme) von selbst, wie die
   --rn-*-Zuordnung bei D79. Wird nur auf der Werkzeugseite geladen. */
/* Kartenfarben exakt wie die Rufnummernsuche (Vorgabe MKu, 2026-09-23):
   dieselben Formeln, die netzikon.css dort auf die --rn-*-Variablen legt —
   ein Erscheinungsbild für beide Werkzeuge, hell wie dunkel. */
.ip-lookup {
  --ipl-water: color-mix(in srgb, var(--graph-blau) 45%, var(--bg));
  --ipl-urban: var(--border);
  --ipl-mark: var(--link);
}

.ip-lookup form { display: flex; gap: 8px; margin-bottom: 16px; }
.ip-lookup input {
  flex: 1; min-width: 0; font: inherit;
  font-family: var(--nz-font-mono); font-size: var(--nz-text-body);
  padding: 8px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--nz-radius-s); background: var(--surface); color: var(--text);
}
.ip-lookup button {
  font: inherit; padding: 8px 16px; border: 0; border-radius: var(--nz-radius-s);
  background: var(--link); color: var(--bg); cursor: pointer;
}
@media (max-width: 520px) {
  .ip-lookup form { flex-wrap: wrap; }
  .ip-lookup input { flex-basis: 100%; }
}

.ip-lookup .ipl-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--nz-radius-m); padding: 12px 16px; margin-bottom: 12px;
}
.ip-lookup .ipl-box h2 { font-size: var(--nz-text-body); font-weight: 600; margin: 0 0 8px; }
.ip-lookup .ipl-box p { margin: 0 0 8px; }
.ip-lookup .ipl-box p:last-child { margin-bottom: 0; }
.ip-lookup dl {
  display: grid; grid-template-columns: 11rem 1fr; gap: 4px 16px; margin: 0;
}
.ip-lookup dt { color: var(--muted); }
.ip-lookup dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .ip-lookup dl { grid-template-columns: 1fr; }
  .ip-lookup dt { margin-top: 6px; }
}

/* Ladeanzeige: drehender Ring plus Sekundenzähler — die Abfragen bei den
   Registries dauern sichtbar, nicht heimlich. tabular-nums, damit der
   Zähler nicht zappelt. */
.ip-lookup .ipl-laden .ipl-uhr { font-variant-numeric: tabular-nums; }
.ip-lookup .ipl-puls {
  display: inline-block; width: .7em; height: .7em; margin-right: 8px;
  border: 2px solid var(--muted); border-top-color: transparent;
  border-radius: 50%; vertical-align: -1px;
  animation: ipl-drehen .8s linear infinite;
}
@keyframes ipl-drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ip-lookup .ipl-puls { animation: none; border-top-color: var(--muted); opacity: .4; }
}

.ip-lookup .mono { font-family: var(--nz-font-mono); font-size: 0.92em; }
.ip-lookup .muted { color: var(--muted); font-size: 0.9em; }
.ip-lookup .err { color: var(--danger); }
.ip-lookup .hint {
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border-radius: var(--nz-radius-s); padding: 8px 12px; margin: 8px 0 0;
  font-size: 0.95em;
}

/* Karte: alle Werte aus rufnummern.css, --rn-* über die netzikon-Zuordnung
   aufgelöst (--rn-bg→--bg, --rn-line→--border, --rn-border→--border-strong,
   --rn-muted→--muted, --rn-urban→--border, --rn-accent→--link). */
.ip-lookup .ipl-karte {
  position: relative; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; background: var(--bg);
  margin: 0 0 14px;
}
.ip-lookup .ipl-karte svg.haupt { display: block; width: 100%; height: auto; }
.ip-lookup .ipl-karte svg.inset {
  position: absolute; right: 8px; bottom: 8px; width: 150px; height: 75px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  opacity: .92;
}
/* Maßstab und Signatur wie die Rufnummern-Karten */
.ip-lookup .ipl-karte .scale { stroke: var(--muted); stroke-width: 1.25; fill: none; }
.ip-lookup .ipl-karte text.signatur { font-size: 10px; fill: var(--muted); opacity: .7; }

/* Detailhintergrund (geo/<cc>.json): Gewässer zurückhaltend, Stadtflächen
   als Form, Grenzen gestrichelt — Werte wie .rufnummern .map .bg. */
.ip-lookup .ipl-karte .bg {
  fill: none; stroke: var(--ipl-water);
  stroke-linejoin: round; stroke-linecap: round;
}
.ip-lookup .ipl-karte .bg.rivers { stroke-width: 1.1; }
.ip-lookup .ipl-karte .bg.coast { stroke-width: 1.4; }
.ip-lookup .ipl-karte .bg.lakes { fill: var(--ipl-water); fill-opacity: .5; stroke-width: .8; }
.ip-lookup .ipl-karte .bg.urban { fill: var(--ipl-urban); fill-opacity: .55; stroke: none; }
/* Kontur in Hintergrundfarbe, damit Namen über Linien lesbar bleiben. */
.ip-lookup .ipl-karte text {
  font: 11px var(--nz-font-sans); fill: var(--muted);
  paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round;
}
.ip-lookup .ipl-karte text.region {
  font-size: 15px; font-weight: 600; letter-spacing: .12em;
  fill: var(--border-strong); stroke: none;
}
.ip-lookup .ipl-karte circle.ort { fill: var(--muted); fill-opacity: .8; }
/* Standort-Marker wie halo/pin der Rufnummern-Karten (Akzentfarbe) */
.ip-lookup .ipl-karte circle.hier { fill: var(--ipl-mark); }
.ip-lookup .ipl-karte circle.hier-halo { fill: var(--ipl-mark); fill-opacity: .25; }

/* Rückfall-Umrisse und Welt-Inset: Länder wie .country/.inset .land der
   Rufnummern-Karten, das hervorgehobene Land voll, die Nachbarn blass. */
.ip-lookup .ipl-karte path {
  fill: var(--ipl-urban); fill-opacity: .35; stroke: var(--border);
  vector-effect: non-scaling-stroke; stroke-width: .5; stroke-linejoin: round;
}
.ip-lookup .ipl-karte path.hl {
  fill: var(--ipl-urban); fill-opacity: 1;
  stroke: var(--border-strong); stroke-width: 1.2;
}

.ip-lookup .ipl-roh summary { cursor: pointer; color: var(--muted); }
.ip-lookup .ipl-roh pre {
  overflow-x: auto; font-size: 0.8em; max-height: 28rem;
  background: var(--nz-code-bg); padding: 8px; border-radius: var(--nz-radius-s);
}

.ip-lookup .ipl-beispiele { margin-top: 24px; }
.ip-lookup .ipl-beispiele .hint { background: none; padding: 0; margin: 0 0 6px; }
.ip-lookup .ipl-beispiele .onb-marken + .hint { margin-top: 12px; }
