/* Health Monitor page only (products/health-monitor.html, en/products/health-monitor.html).
   Small additions the shared engine does not express. Colours: --ok / --warn / --crit / --offline = equipment state only. */

/* ---- tiles ---- */
.hm-tile { position: relative; }
.hm-legend { gap: 6px 16px; }
.hm-legend .mk-st { font-size: 12px; }

/* ---- port squares / speaker dots: an ok mark stacked on its changed mark ---- */
.hm-p { display: grid; }
.hm-p > * { grid-area: 1 / 1; }
.hm-p > i { display: block; width: 14px; height: 14px; border-radius: 3px; background: var(--ok); }
.hm-p > i.is-warn { background: var(--warn); border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hm-pd > i { width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box; }
.hm-pd > i.is-off { background: transparent; border: 2px solid var(--offline); }
.hm-poe > i { background: var(--text-2); opacity: .7; }
.mk-bars .mk-ports > i { flex: none; }

.hm-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); }
.hm-zone__n { flex: 0 0 100%; font: 600 12px/1.5 var(--mono); color: var(--text-2); }

/* ---- threshold labels under a gauge ---- */
.hm-scale { position: relative; height: 22px; font-size: 12px; color: var(--text-2); }
.hm-scale span { position: absolute; top: 0; white-space: nowrap; line-height: var(--lh-th); }
.hm-scale .w { right: 40%; }
.hm-scale .c { left: 82%; }
.mk-bars .hm-scale { grid-column: 2; }

/* ---- small helpers ---- */
.hm-grp { display: grid; gap: 8px; min-width: 0; align-content: start; }
.hm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; min-width: 0; }
.hm-ph { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--line); }
.hm-ph--s { width: 60%; }
.hm-cap { font-size: 12px; line-height: var(--lh-th); color: var(--text-2); overflow-wrap: break-word; }
.hm-mono { font-family: var(--mono); font-size: 12px; }
.hm-sw { display: inline-block; width: 18px; height: 10px; margin-right: 6px; border-radius: 3px; background: rgba(255, 255, 255, .34); vertical-align: -1px; }
.hm-sw--t { width: 0; height: 12px; border-radius: 0; background: none; border-left: 2px dashed var(--text); vertical-align: -2px; }
.hm-phone { display: grid; place-items: center; justify-self: start; min-height: 54px; padding: 8px 14px; border: 2px solid var(--text-2); border-radius: 14px; font-size: 12.5px; color: var(--text); }
.hm-flip { align-items: center; color: var(--text); }
.hm-lockchip { display: inline-flex; align-items: center; gap: 6px; }
.hm-widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-widgets .mk-box { display: grid; gap: 2px; }
.hm-bars3 { display: grid; gap: 10px; }
.hm-bars3 .mk-bar { height: 14px; }
.hm-tab { display: block; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: var(--lh-th); color: var(--text-2); overflow-wrap: break-word; }
.hm-tab.is-on { color: var(--text); border-bottom-color: var(--text); }
.mk-side.hm-side { width: 56%; }

/* ---- maintenance: struck-through report line ---- */
.hm-strk { position: relative; display: inline-block; }
.hm-strikeline { position: absolute; left: 0; right: 0; top: 56%; height: 2px; background: var(--text-2); }
.hm-maint .mk-aud { flex-wrap: wrap; }

/* ---- IP range scan ---- */
.hm-sweepw { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
.hm-sweepw::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; border-radius: 999px; background: rgba(255, 255, 255, .7); }

/* ---- multi-site: WAN cut, buffer fills, line returns, buffer empties (neutral: a link outage is not a device fault) ---- */
.hm-sites { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(64px, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 10px 0; align-items: center; }
.hm-site { display: grid; gap: 6px; font-size: 12.5px; line-height: var(--lh-th); color: var(--text); overflow-wrap: break-word; }
.hm-server { grid-column: 3; grid-row: 1 / 3; align-self: stretch; display: grid; place-items: center; text-align: center; font-size: 13px; color: var(--text); border-color: var(--text-2); }
.hm-wan { position: relative; height: 40px; }
.hm-wanline { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--text-2); opacity: .7; }
.hm-wandash { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); }
.hm-wanlbl { position: absolute; left: 50%; top: -4px; transform: translateX(-50%); white-space: nowrap; background: var(--surface); z-index: 1; }
.mk-buf > i.hm-bufi { transform: scaleX(0); }
.mk [data-a="cut"] { --an: hm-cut; --t: 2800ms; }
.mk [data-a="buf"] { --an: hm-buf; --t: 2800ms; }
.mk [data-a="regrow"] { --an: hm-regrow; --t: 2400ms; }
.mk--armed:not(.is-b1) [data-a="regrow"][data-at="1"] { transform: scaleX(0); }
@keyframes hm-cut { 0%, 10% { opacity: .7; } 20%, 72% { opacity: 0; } 88%, 100% { opacity: .7; } }
@keyframes hm-buf { 0%, 20% { transform: scaleX(0); } 55%, 65% { transform: scaleX(1); } 92%, 100% { transform: scaleX(0); } }
@keyframes hm-regrow { 0% { transform: scaleX(0); } 20%, 32% { transform: scaleX(.7); } 36% { transform: scaleX(0); } 55%, 66% { transform: scaleX(.5); } 70% { transform: scaleX(0); } 100% { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .mk [data-a="cut"], .mk [data-a="buf"], .mk [data-a="regrow"] { animation: none !important; }
}
@media (max-width: 480px) {
  .mk-bars > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mk-bars .hm-scale { grid-column: 1; }
  .hm-sites { grid-template-columns: minmax(0, 1.3fr) minmax(48px, .7fr) minmax(0, 1fr); }
}

