/* =====================================================================
   ipv6-visual-subnet-calculator.css : only for the IPv6 Visual Subnet Calculator page
   Loaded with:  $page_styles = ['/assets/css/ipv6-visual-subnet-calculator.css'];
   Shared calculator styles (buttons, fonts, result tables, show-columns) come from site.css.
   ===================================================================== */

/* Result table box: fixed width, scrolls sideways and up/down */
.res-scroll { max-width: 100%; max-height: 360px; overflow: auto; border: 1px solid #d5dbe3; border-radius: 8px; }
.res-table { border-radius: 0; }
.res-table th, .res-table td { text-align: center; }
@media (min-width: 1024px) { .res-scroll { max-height: 420px; } }

/* Example box (copy it, then paste it into the box below) */
.ex-box { margin: 0 0 8px; padding: 8px 12px; background: #f1f8f8; border: 1px dashed #b9dcdd; border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-input); line-height: 1.7; color: #22577A; white-space: pre-wrap; overflow-x: auto; }


/* (number tiles are not used on this page) */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 4px 0 8px; }
@media (min-width: 640px) { .stat-row { grid-template-columns: repeat(4, 1fr); gap: 8px; } }
.stat { background: #f1f8f8; border: 1px solid #d9ecec; border-radius: 10px; padding: 6px 10px; min-width: 0; }
.stat b { display: block; font-size: 17px; line-height: 1.3; color: #22577A; font-family: 'IBM Plex Mono', monospace; }
.stat span { display: block; font-size: var(--fs-note); color: #4b5563; line-height: 1.3; }

/* Small headings inside the result card */
.sub-title { font-size: var(--fs-title); font-weight: 700; color: #22577A; margin: 10px 0 5px; line-height: 1.3; }
.sub-rule { border: 0; border-top: 1px solid #e3e8ee; margin: 12px 0 0; }

/* Guide */
.article .ex-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: #22577A; margin: 14px 0 6px; }

/* Status words in the table */
td.st-bad { color: #b91c1c; font-weight: 600; }
.res-table td.left { text-align: left; }

/* Slider badge and filled-in box (same look as the other calculators) */
.res-table td.left { text-align: left; }

/* Split / Join pills (as in the Hierarchy column): Split = teal, Join = blue. Only these two colours. */
.mini-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 22px; padding: 0 8px; border: 0; border-radius: 6px;
  background: #38A3A5; color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap; }
.mini-btn:hover { background: #2d8587; }
.mini-btn.join { background: #22577A; }
.mini-btn.join:hover { background: #1a4460; }
.mini-btn:focus-visible { outline: 2px solid #22577A; outline-offset: 2px; }
.vs-end { display: inline-block; min-width: 40px; padding: 3px 8px; border-radius: 6px; background: #eef1f4; color: #6b7280; font-size: 11.5px; font-weight: 700; }

/* Hierarchy cells: Split button on each row, Join buttons spanning the rows they cover */
.res-table td.vs-split { padding: 2px 4px; text-align: center; background: #fff; }
.res-table td.vs-joincell { padding: 2px 4px; min-width: 48px; background: #fff; vertical-align: middle; text-align: center; }
.res-table tbody tr:hover td.vs-split, .res-table tbody tr:hover td.vs-joincell { background: #fff; }
.res-table td.vs-split, .res-table td.vs-joincell { border-left: 1px solid #e2e6ec; }
.res-table th.vs-h { text-align: center; }

.vs-note { width: 120px; height: 22px; padding: 0 6px; border: 1px solid #d5dbe3; border-radius: 6px; font-size: 11.5px; background: #fff; }
.vs-note:focus { outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(56,163,165,.18); }

/* Toolbar over the map: divide all / join all */
.vs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 8px; }
.mini-select { height: 28px; padding: 0 26px 0 8px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-size: var(--fs-label); color: #22577A; font-weight: 600; cursor: pointer; }
.mini-select:focus { outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(56,163,165,.18); }

/* Hierarchy tree */
.vs-tree { max-height: 420px; overflow: auto; border: 1px solid #d5dbe3; border-radius: 8px; background: #fff; }
.vs-node { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 8px 5px calc(8px + var(--d, 0) * 20px);
  border-bottom: 1px solid #eef1f4; font-size: var(--fs-result); position: relative; }
.vs-node:last-child { border-bottom: 0; }
.vs-node::before { content: ''; position: absolute; left: calc(8px + var(--d, 0) * 20px - 11px); top: 0; bottom: 0; width: 0; border-left: 2px solid #cfe6e6; display: var(--guide, block); }
.vs-node[style*="--d:0"]::before, .vs-node[style*="--d: 0"]::before { display: none; }
.vs-node b { font-family: 'IBM Plex Mono', monospace; color: #22577A; font-weight: 600; }
.vs-node .vs-meta { font-family: 'IBM Plex Mono', monospace; color: #4b5563; font-size: 12px; }
.vs-node .vs-acts { margin-left: auto; display: inline-flex; gap: 6px; }
.vs-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }
.vs-kind.parent { background: #E5EDF2; color: #22577A; }
.vs-kind.leaf { background: #E8F5F5; color: #227274; }
.card-note.warn { color: #b45309; font-weight: 600; }
