/* Passive DNS results (/manage/passive_dns) — the databoxes' and
   pdns.dnsvault.io's standard (owner 2026-11-17: "the standard also should be
   the same … nice uiux ever"). Every column fits the frame: the small ones fit
   their content (c-fit), a name is capped and the answer takes the rest, both
   on one line ending in "…" with the full value in the standard tooltip
   (.pdns-tip); a name or an address opens its intel page in the side panel
   (.ipanel); on a phone each record is a card. */

.pdns-records-wrap { container-type: inline-size; border: 1px solid #e5e7eb; border-radius: .5rem; background: #fff; overflow-x: auto; }
.pdns-records-wrap.plain { border: 0; border-radius: 0; } /* inside a card (the intel page's Resolutions) */
table.pdns-records { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pdns-records th { text-align: left; padding: .55rem .75rem; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: #94a3b8; background: #f9fafb; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
table.pdns-records td { padding: .5rem .75rem; border-bottom: 1px solid #f1f5f9; white-space: nowrap; vertical-align: middle; }
table.pdns-records tbody tr:last-child td { border-bottom: 0; }
table.pdns-records tbody tr:hover { background: #f8fafc; }
table.pdns-records tbody tr[hidden] { display: none !important; }
table.pdns-records .num { text-align: right; font-variant-numeric: tabular-nums; }
table.pdns-records .c-fit { width: 1%; }
table.pdns-records td.c-data { width: 100%; max-width: 0; min-width: 14rem; }
table.pdns-records .trunc { display: inline-block; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
table.pdns-records td.c-data .trunc { max-width: calc(100% - 1.6rem); }
table.pdns-records td.c-data:has([data-listed]) .trunc { max-width: calc(100% - 6.5rem); } /* room for "malicious" + the icon */
table.pdns-records a.pdns-val { color: #4338ca; text-decoration: none; }
table.pdns-records a.pdns-val:hover { text-decoration: underline; }
table.pdns-records span.pdns-val { color: #1e293b; }
.pdns-pivot { display: inline-flex; align-items: center; margin-left: .3rem; color: #94a3b8; vertical-align: middle; }
.pdns-pivot:hover { color: #4338ca; }
.pdns-type { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; background: #eef2ff; color: #4338ca; }
@container (max-width: 860px) { table.pdns-records td.c-name .trunc { max-width: 11rem; } }

@media (max-width: 640px) {
  /* A record per card: name + type, the answer, then count and dates. */
  .pdns-records-wrap { border: 0; background: none; overflow: visible; }
  table.pdns-records thead { display: none; }
  table.pdns-records, table.pdns-records tbody { display: block; }
  table.pdns-records tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; margin-bottom: 8px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
  table.pdns-records td, table.pdns-records td.c-fit { display: block; width: auto; padding: 0; border: 0; text-align: left; }
  table.pdns-records td.c-name { order: 1; flex: 1 1 0; min-width: 0; }
  table.pdns-records td.c-name .trunc { font-weight: 600; }
  table.pdns-records td.c-type { order: 2; flex: none; }
  table.pdns-records td.c-data { order: 3; flex: 1 1 100%; max-width: none; min-width: 0; }
  table.pdns-records td.c-name .trunc, table.pdns-records td.c-data .trunc { max-width: calc(100% - 1.6rem); }
  table.pdns-records td.c-count, table.pdns-records td.c-first, table.pdns-records td.c-last { order: 4; font-size: 11.5px; color: #64748b; }
  table.pdns-records td.c-count::before, table.pdns-records td.c-first::before, table.pdns-records td.c-last::before { content: attr(data-label) " ";
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
}

/* The standard tooltip for a cut-off value (trunc-tip controller): a light card,
   an accent edge, the table's font, long values wrap — only when cut off. */
.pdns-tip { position: fixed; z-index: 90; max-width: min(40rem, calc(100vw - 2rem)); padding: .5rem .75rem; border-radius: .5rem;
  background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-left: 3px solid var(--accent, #4f46e5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(20, 30, 45, .14), 0 2px 6px rgba(20, 30, 45, .08); overflow-wrap: anywhere; white-space: normal; pointer-events: none;
  opacity: 0; transform: translateY(2px); transition: opacity .12s ease, transform .12s ease; }
.pdns-tip.on { opacity: 1; transform: none; }
.pdns-tip[hidden] { display: none; }

/* The intel side panel (intel-panel controller): the intel page over the
   results, ‹ Back · Full page ↗ · ✕ (and Esc, or a click outside). */
.ipanel { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; }
.ipanel[hidden] { display: none; }
.ipanel-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); }
.ipanel-sheet { position: relative; display: flex; flex-direction: column; width: min(1100px, 94vw); height: 100%; background: #f8fafc;
  box-shadow: -12px 0 32px rgba(15, 23, 42, .18); animation: ipanel-in .18s ease-out; }
.ipanel-bar { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: #fff; border-bottom: 1px solid #e5e7eb; }
.ipanel-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ipanel-bar button, .ipanel-full { display: inline-flex; align-items: center; height: 30px; padding: 0 .65rem; border: 1px solid #e5e7eb; border-radius: .4rem;
  background: #fff; color: #334155; font-size: 13px; text-decoration: none; cursor: pointer; }
.ipanel-bar button:hover, .ipanel-full:hover { border-color: #c7d2fe; color: #4338ca; }
.ipanel-bar button:disabled { opacity: .4; cursor: default; }
.ipanel iframe { flex: 1; width: 100%; border: 0; background: #f8fafc; }
body.ipanel-open { overflow: hidden; }
@keyframes ipanel-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) { .ipanel-sheet { width: 100vw; } }
@media (prefers-reduced-motion: reduce) { .ipanel-sheet { animation: none; } .pdns-tip { transition: none; } }
