/* Wireshark-style offline packet workbench, scoped to its own virtual window. */
.app-wireshark { border-radius:10px; }
.app-wireshark .titlebar { height:34px; border-radius:10px 10px 0 0; }
.app-wireshark .win-title { font-size:12px; line-height:34px; padding-inline:110px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.app-wireshark .win-body { overflow:hidden; border-radius:0 0 10px 10px; }
.ws-app { --ws-bg:#fff; --ws-pane:#fafafa; --ws-toolbar:#f0f0f0; --ws-line:#bbb; --ws-ink:#171717; --ws-muted:#666; --ws-blue:#1a67b2; --ws-select:#1e65b8; --ws-select-text:#fff; --ws-good:#ccffcc; --ws-bad:#ffcece; --ws-warning:#fff0b0; --ws-highlight:#1967bf; --ws-client:#a31822; --ws-server:#1636a6; --ws-tcp:#e7e6ff; --ws-http:#dcf1d5; --ws-dns:#d8e9ff; --ws-arp:#faf0d7; --ws-icmp:#f8e0f2; --ws-overlay:#0005; --ws-marked:#232323; --ws-marked-text:#fff; --ws-font:12px;
 height:100%; min-height:0; display:flex; flex-direction:column; background:var(--ws-bg); color:var(--ws-ink); font:var(--ws-font)/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; container-type:inline-size; container-name:packet-window; color-scheme:light; }
.ws-app * { box-sizing:border-box; }
.ws-app button,.ws-app input,.ws-app select { color:inherit; font:inherit; }
.ws-app button { cursor:pointer; }
.ws-app button:disabled { opacity:.35; cursor:default; }
.ws-app [hidden] { display:none!important; }
.ws-app button:focus-visible,.ws-app input:focus-visible,.ws-app select:focus-visible,.ws-app summary:focus-visible,.ws-app tr:focus-visible,.ws-app [tabindex]:focus-visible { outline:2px solid var(--ws-blue); outline-offset:-2px; }
.ws-toolbar { display:flex; align-items:center; gap:3px; padding:4px 7px; flex:none; border-bottom:1px solid var(--ws-line); background:var(--ws-toolbar); overflow-x:auto; white-space:nowrap; min-height:36px; }
.ws-toolbar button { min-width:27px; height:27px; padding:2px 5px; border:1px solid transparent; border-radius:3px; background:none; font-size:17px; }
.ws-toolbar button:hover:not(:disabled),.ws-toolbar button[aria-pressed=true] { background:var(--ws-bg); border-color:var(--ws-line); }
.ws-toolbar .ws-follow-button { font-size:11px; padding-inline:8px; margin-left:auto; }
.ws-tool-sep { width:1px; background:var(--ws-line); align-self:stretch; margin:2px 4px; flex:none; }
.ws-file-input { display:none; }
.ws-filter { display:flex; gap:0; flex:none; padding:4px 6px; background:var(--ws-toolbar); border-bottom:1px solid var(--ws-line); min-height:33px; }
.ws-filter input { flex:1; min-width:0; font:12px/1.4 Menlo,Consolas,monospace; padding:3px 7px; border:1px solid var(--ws-line); background:var(--ws-bg); color:var(--ws-ink); border-radius:0; }
.ws-filter input.is-valid { background:var(--ws-good); color:#152315; }
.ws-filter input.is-invalid { background:var(--ws-bad); color:#381616; }
.ws-filter button { border:1px solid var(--ws-line); background:var(--ws-pane); min-width:27px; padding:2px 6px; font-size:16px; border-radius:0; }
.ws-filter .ws-apply { color:var(--ws-blue); font-weight:700; }
.ws-filter-message { flex:none; background:var(--ws-bad); color:#3f1515; padding:5px 10px; font-size:11px; }
.ws-offline { flex:none; padding:4px 10px; border-bottom:1px solid var(--ws-line); background:var(--ws-pane); color:var(--ws-muted); font-size:10px; }
.ws-find { display:flex; gap:6px; padding:5px; border-bottom:1px solid var(--ws-line); background:var(--ws-toolbar); }
.ws-find input { flex:1; min-width:0; padding:5px 8px; border:1px solid var(--ws-line); background:var(--ws-bg); }
.ws-find button { padding:3px 8px; border:1px solid var(--ws-line); border-radius:3px; background:var(--ws-pane); }
.ws-panes { flex:1; min-height:0; display:grid; grid-template-rows:minmax(85px,1.65fr) 5px minmax(80px,1.1fr) 5px minmax(75px,.85fr); overflow:hidden; }
.ws-list-pane,.ws-details,.ws-byte-pane { min-height:0; min-width:0; overflow:auto; }
.ws-packet-scroll { height:100%; overflow:auto; }
.ws-packets { border-collapse:collapse; min-width:850px; width:100%; table-layout:auto; font:var(--ws-font)/1.3 Menlo,Consolas,monospace; }
.ws-packets th { position:sticky; top:0; background:var(--ws-toolbar); border-right:1px solid var(--ws-line); border-bottom:1px solid var(--ws-line); z-index:1; padding:0; text-align:left; white-space:nowrap; height:24px; }
.ws-packets th button { border:0; background:none; padding:3px 7px; width:100%; text-align:left; font-size:11px; }
.ws-packets th[aria-sort=ascending] button::after { content:' ▴'; color:var(--ws-muted); }
.ws-packets th[aria-sort=descending] button::after { content:' ▾'; color:var(--ws-muted); }
.ws-packets td { padding:2px 7px; white-space:nowrap; height:20px; border:0; }
.ws-packets td:first-child { text-align:right; min-width:42px; }
.ws-packets .ws-info-cell { width:100%; min-width:330px; max-width:800px; overflow:hidden; text-overflow:ellipsis; }
.ws-proto-tcp,.ws-proto-tls,.ws-proto-ssh { background:var(--ws-tcp); }
.ws-proto-dns { background:var(--ws-dns); }
.ws-proto-http { background:var(--ws-http); }
.ws-proto-arp { background:var(--ws-arp); }
.ws-proto-icmp { background:var(--ws-icmp); }
.ws-no-colors .ws-packets tbody tr { background:var(--ws-bg); }
.ws-packets tbody .is-marked { background:var(--ws-marked); color:var(--ws-marked-text); }
.ws-packets tbody .is-selected,.ws-no-colors .ws-packets tbody .is-selected { background:var(--ws-select); color:var(--ws-select-text); }
.ws-empty { color:var(--ws-muted); padding:15px!important; font:12px/1.5 -apple-system,sans-serif; }
.ws-splitter { background:var(--ws-toolbar); border-block:1px solid var(--ws-line); cursor:row-resize; touch-action:none; }
.ws-splitter:hover { background:var(--ws-blue); }
.ws-details { padding:3px 7px 10px; background:var(--ws-bg); font:var(--ws-font)/1.4 Menlo,Consolas,monospace; }
.ws-layer summary { padding:2px 4px; cursor:pointer; white-space:nowrap; }
.ws-layer[open] summary { background:var(--ws-pane); }
.ws-field { border:0; background:none; display:block; text-align:left; padding:2px 9px 2px 25px; white-space:pre-wrap; overflow-wrap:anywhere; width:100%; color:var(--ws-ink); font:inherit; }
.ws-field:hover { background:var(--ws-toolbar); }
.ws-byte-pane { background:var(--ws-bg); }
.ws-byte-caption { position:sticky; top:0; background:var(--ws-pane); border-bottom:1px solid var(--ws-line); padding:3px 10px; font-size:10px; color:var(--ws-muted); z-index:1; }
.ws-bytes { min-width:620px; padding:5px 8px 10px; font:var(--ws-font)/1.7 Menlo,Consolas,monospace; }
.ws-byte-row { display:flex; align-items:center; gap:14px; white-space:nowrap; }
.ws-byte-offset { color:var(--ws-muted); width:38px; flex:none; }
.ws-byte-hex { display:flex; width:400px; gap:4px; flex:none; }
.ws-byte { background:none; border:0; border-radius:0; padding:0; width:20px; text-align:center; font:inherit; flex:none; }
.ws-byte:nth-child(8) { margin-right:9px; }
.ws-byte-ascii { letter-spacing:1px; }
.ws-byte.is-highlighted,.ws-byte-ascii .is-highlighted { background:var(--ws-highlight); color:var(--ws-select-text); }
.ws-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:4px 8px; border-top:1px solid var(--ws-line); background:var(--ws-toolbar); flex:none; min-height:24px; font-size:10px; }
.ws-message { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-width:0; }
.ws-counts { white-space:nowrap; flex:none; border-left:1px solid var(--ws-line); padding-left:10px; }
.ws-warning { font-size:11px; padding:8px 10px; color:var(--ws-ink); background:var(--ws-warning); border-radius:3px; }
.ws-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:var(--ws-overlay); z-index:100; padding:12px; }
.ws-dialog { display:flex; flex-direction:column; width:780px; max-width:100%; max-height:100%; overflow:auto; background:var(--ws-bg); color:var(--ws-ink); border:1px solid var(--ws-line); border-radius:7px; box-shadow:0 12px 40px var(--ws-overlay); padding:16px; }
.ws-dialog-header { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-bottom:10px; border-bottom:1px solid var(--ws-line); flex:none; }
.ws-dialog-header h2 { font-size:16px; margin:0; }
.ws-dialog button { border:1px solid var(--ws-line); border-radius:4px; padding:5px 10px; background:var(--ws-toolbar); }
.ws-dialog-header button { border:0; background:none; font-size:21px; padding:0 5px; }
.ws-dialog select,.ws-dialog input { background:var(--ws-bg); color:var(--ws-ink); border:1px solid var(--ws-line); border-radius:3px; padding:5px; min-width:0; }
.ws-go-form { display:flex; flex-direction:column; gap:12px; padding-top:15px; }
.ws-go-form input { width:100%; }
.ws-packet-properties { display:grid; grid-template-columns:minmax(120px,1fr) minmax(0,2fr); gap:8px 15px; font:12px/1.4 Menlo,monospace; }
.ws-packet-properties dt { color:var(--ws-muted); }
.ws-packet-properties dd { margin:0; overflow-wrap:anywhere; }
.ws-stream-dialog { height:650px; }
.ws-stream-peers { font-size:12px; flex:none; margin:12px 0; }
.ws-stream-view { flex:1; min-height:80px; overflow:auto; border:1px solid var(--ws-line); background:var(--ws-pane); padding:12px; font:12px/1.5 Menlo,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.ws-client { color:var(--ws-client); }
.ws-server { color:var(--ws-server); }
.ws-stream-options { display:flex; align-items:center; gap:8px; margin:10px 0; flex-wrap:wrap; flex:none; font-size:11px; }
.ws-stream-options select { max-width:100%; }
.ws-dialog-actions { display:flex; gap:7px; flex-wrap:wrap; align-items:center; padding-top:12px; flex:none; font-size:11px; }
.ws-stream-stats { color:var(--ws-muted); margin-left:auto; }
.ws-summary-scroll { overflow:auto; margin-top:10px; }
.ws-summary-table { width:100%; border-collapse:collapse; font-size:12px; text-align:left; margin-top:10px; }
.ws-summary-table th,.ws-summary-table td { padding:7px 10px; border-bottom:1px solid var(--ws-line); white-space:nowrap; }
.ws-summary-table th { background:var(--ws-toolbar); }
.ws-dialog .ws-example { display:block; text-align:left; margin:5px 0; font:12px Menlo,monospace; }
.ws-context { position:fixed; z-index:200; background:var(--ws-bg); color:var(--ws-ink); border:1px solid var(--ws-line); border-radius:6px; padding:5px; box-shadow:0 6px 20px var(--ws-overlay); max-width:calc(100vw - 16px); max-height:80vh; overflow:auto; }
.ws-context button { display:block; width:100%; text-align:left; border:0; background:none; padding:8px 13px; border-radius:3px; font-size:12px; overflow-wrap:anywhere; }
.ws-context button:hover:not(:disabled) { background:var(--ws-select); color:var(--ws-select-text); }
@container packet-window (max-width:760px) { .ws-offline { font-size:9px; } .ws-footer { flex-wrap:wrap; gap:3px; } .ws-counts { padding-left:0; border:0; } .ws-toolbar .ws-follow-button { min-width:120px; } .ws-dialog { padding:12px; } .ws-stream-stats { margin-left:0; } }
@media (prefers-color-scheme:dark) {
 .ws-app { --ws-bg:#202124; --ws-pane:#28292d; --ws-toolbar:#303136; --ws-line:#505157; --ws-ink:#e7e7eb; --ws-muted:#a5a6ac; --ws-blue:#8fc9ff; --ws-select:#315c98; --ws-good:#b8dfb8; --ws-bad:#e9b4b4; --ws-warning:#665728; --ws-tcp:#363249; --ws-http:#273e2b; --ws-dns:#283b50; --ws-arp:#45412c; --ws-icmp:#472f42; --ws-client:#ffa0a0; --ws-server:#9ebfff; }
}
