/* DNS Propagation Check (Network Tools). Nutzt die Design-Tokens aus design-system.css. */

#dnsPropSection {
  --dp-ok: #3fb950;
  --dp-warn: #d29922;
  --dp-bad: #f85149;
}

#dnsPropSection .dnsprop-hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted, #98a2b3);
}

/* Formular: gleiche Optik und Aufteilung wie beim DNS Lookup (dessen Stile haengen an dessen IDs) */
#dnsPropSection .dns-form-container {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin: 18px 0 0;
}

#dnsPropSection .dns-form-container input,
#dnsPropSection .dns-form-container select {
  box-sizing: border-box;
  height: 42px;
  margin: 0;
  padding: 0 16px;
  background-color: var(--surface2, #222);
  color: var(--text, #e8ecf2);
  border: 1px solid var(--border, #2b333f);
  border-radius: 6px;
  font-family: var(--font-sans, inherit);
  font-size: 0.95rem;
  line-height: 1.2;
}

#dnsPropSection .dns-form-container input {
  flex: 1.15 1 220px;
  min-width: 0;
}

#dnsPropSection .dns-form-container input::placeholder {
  color: var(--muted, #98a2b3);
  opacity: 0.8;
}

#dnsPropSection .dns-form-container select {
  flex: 1 1 140px;
  min-width: 0;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

#dnsPropSection .dns-form-container button {
  flex: 0 0 auto;
  height: 42px;
  margin: 0;
  padding: 0 26px;
  cursor: pointer;
}

#dnsPropSection .dns-form-container input:focus-visible,
#dnsPropSection .dns-form-container select:focus-visible,
#dnsPropSection .dns-form-container button:focus-visible {
  outline: 2px solid var(--accent, #5aa2ff);
  outline-offset: 2px;
}

/* Ergebnis */
#dnsPropSection .dnsprop-result {
  margin-top: 18px;
}

#dnsPropSection .dnsprop-meta {
  margin-bottom: 8px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  color: var(--muted, #98a2b3);
  word-break: break-all;
}

#dnsPropSection .dnsprop-status {
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border, #2b333f);
  border-left-width: 4px;
  border-radius: var(--radius-md, 10px);
  font-size: 0.95rem;
  line-height: 1.5;
}

#dnsPropSection .dnsprop-status--info  { border-left-color: var(--accent, #5aa2ff); }
#dnsPropSection .dnsprop-status--ok    { border-left-color: var(--dp-ok); }
#dnsPropSection .dnsprop-status--warn  { border-left-color: var(--dp-warn); }
#dnsPropSection .dnsprop-status--error { border-left-color: var(--dp-bad); }

#dnsPropSection .dnsprop-section {
  margin: 18px 0 8px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #98a2b3);
}

#dnsPropSection .dnsprop-table {
  border: 1px solid var(--border, #2b333f);
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
}

#dnsPropSection .dnsprop-row {
  display: grid;
  grid-template-columns: minmax(140px, 230px) 1fr auto;
  gap: 6px 16px;
  align-items: start;
  padding: 10px 14px;
  border-top: 1px solid var(--border, #2b333f);
}

#dnsPropSection .dnsprop-row:first-child {
  border-top-width: 0;
}

#dnsPropSection .dnsprop-resolver {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

#dnsPropSection .dnsprop-loc {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted, #98a2b3);
}

#dnsPropSection .dnsprop-values {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#dnsPropSection .dnsprop-value {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#dnsPropSection .dnsprop-ttl {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.72rem;
  color: var(--muted, #98a2b3);
}

#dnsPropSection .dnsprop-empty {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted, #98a2b3);
}

#dnsPropSection .dnsprop-flag {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
  white-space: nowrap;
}

#dnsPropSection .dnsprop-row--ok .dnsprop-flag   { color: var(--dp-ok); }
#dnsPropSection .dnsprop-row--diff .dnsprop-flag { color: var(--dp-warn); }
#dnsPropSection .dnsprop-row--fail .dnsprop-flag { color: var(--dp-bad); }
#dnsPropSection .dnsprop-row--auth .dnsprop-flag { color: var(--accent, #5aa2ff); }

#dnsPropSection .dnsprop-row--diff { box-shadow: inset 3px 0 0 var(--dp-warn); }
#dnsPropSection .dnsprop-row--fail { box-shadow: inset 3px 0 0 var(--dp-bad); }
#dnsPropSection .dnsprop-row--auth { box-shadow: inset 3px 0 0 var(--accent, #5aa2ff); }

@media (max-width: 640px) {
  #dnsPropSection .dns-form-container input,
  #dnsPropSection .dns-form-container select {
    flex-basis: 100%;
  }
  #dnsPropSection .dns-form-container button {
    flex: 1 1 100%;
  }
  #dnsPropSection .dnsprop-row {
    grid-template-columns: 1fr;
  }
}

/* Copy-Button: Grundoptik kommt wie beim Check-Button aus den globalen Button-Stilen */
#dnsPropSection .dnsprop-copy {
  display: inline-block;
  margin: 16px 0 0;
  cursor: pointer;
}
