/* dns.css – styles for the DNS Lookup tool only */

.field-narrow { flex: 0 1 200px !important; }

.hint { margin: 16px 0 0; font-size: .85rem; color: var(--muted); text-align: left; }
.hint a { color: var(--accent); text-decoration: none; }
.hint a:hover { text-decoration: underline; }

.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.results-head h2 { margin-top: 0; }
.results-head .meta { font-size: .8rem; color: var(--muted); }

.results-table td a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--muted); }
.results-table td a:hover { color: var(--accent); border-color: var(--accent); }
.results-table .ttl { width: 1%; white-space: nowrap; text-align: right; color: var(--muted); }

/* Record type badges */
.rtype {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56,189,248,.15);
  color: var(--accent);
  font-family: ui-monospace, Consolas, monospace;
}
.rtype-mx    { background: rgba(167,139,250,.15); color: #c4b5fd; }
.rtype-txt   { background: rgba(245,158,11,.15);  color: #fcd34d; }
.rtype-ns, .rtype-soa { background: rgba(34,197,94,.15); color: #86efac; }
.rtype-cname { background: rgba(244,114,182,.15); color: #f9a8d4; }

.rlabel {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  margin: 0 8px 4px 0;
}

/* SOA details inside a table cell */
dl.soa { margin: 0; font-size: .85rem; grid-template-columns: auto 1fr; gap: 4px 14px; }
dl.soa dt { font-family: system-ui, sans-serif; }

.share { margin: 16px 0 0; font-size: .8rem; color: var(--muted); }
.share a { color: var(--accent); text-decoration: none; }
.share code { display: inline-block; margin: 4px 0 0; font-size: .8rem; max-width: 100%; overflow-wrap: anywhere; }

/* Glossary in the explainer */
dl.glossary { grid-template-columns: 80px 1fr; gap: 10px 20px; font-size: 1rem; margin-top: 12px; }
dl.glossary dt { color: var(--accent); font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
dl.glossary dd { font-family: inherit; color: #cbd5e1; }

/* Phones: stack each record – type and TTL on one line, value underneath */
@media (max-width: 600px) {
  .dns-table, .dns-table tbody { display: block; }
  .dns-table tr.head { display: none; }
  .dns-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "type ttl" "value value";
    gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }
  .dns-table tr:last-child { border-bottom: 0; }
  .dns-table td { display: block; padding: 0; border: 0; }
  .dns-table .c-type  { grid-area: type; }
  .dns-table .c-ttl   { grid-area: ttl; width: auto; }
  .dns-table .c-ttl::before { content: "TTL "; font-family: system-ui, sans-serif; font-size: .75rem; }
  .dns-table .c-value { grid-area: value; }
  dl.soa { grid-template-columns: 1fr; gap: 0; }
  dl.soa dt { font-size: .75rem; color: var(--muted); margin-top: 6px; }
}

@media (max-width: 520px) {
  .field-narrow { flex: 1 1 100% !important; }
  dl.glossary { grid-template-columns: 1fr; gap: 2px; }
  dl.glossary dd { margin-bottom: 10px; }
}
