/* =========================================================================
   SafeAll Asia - CCTV-IoT Sharing product page extras (linked from the two cctv-iot-sharing pages only).
   Everything here composes the shared engine (product.css / product.js). No status colours: the owner publish
   switches, viewer tiles and owner-type pins are neutral or category colours (shape + colour), never ok/warn/crit.
   The one place the status palette appears is the monthly availability report (.mk-seg3), which is camera state.
   ========================================================================= */

/* ---- rows + toggle (first use of the P5 toggle look) ---- */
.mk .pub__row { font-size: 13px; padding: 8px 11px; gap: 6px 10px; }
.mk .pub__id { margin-right: 8px; }
.mk .pub__meta { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mk .pill { font-size: 12.5px; line-height: var(--lh-th); overflow-wrap: break-word; }
.mk-stack--end { justify-items: end; align-items: center; }
.mk-stack > .mk-toggle { justify-self: end; }
.pub__row--tog, .pub__row--rev { transition: border-left-color .4s var(--ease) 1.1s; }
.mk.is-b1 .pub__row--tog { border-left-color: var(--text-2); }
.mk.is-b4 .pub__row--rev { border-left-color: var(--line); transition-delay: 1s; }

/* ---- small shared bits ---- */
.mk-cap { display: inline-flex; align-items: center; gap: 6px; align-self: start; max-width: 100%; padding: 2px 10px; border: 1px dashed var(--muted); border-radius: 999px; font-size: 12px; line-height: var(--lh-th); color: var(--text-2); overflow-wrap: break-word; }
.mk-cap .mk-glyph { width: 13px; height: 13px; }
.mk-lay--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-end { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mk-note { font-size: 12.5px; line-height: var(--lh-th); color: var(--text-2); }

/* ---- browser / phone frames ---- */
.mk-bf { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); overflow: hidden; overflow: clip; }
.mk-bf__bar { display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-bottom: 1px solid var(--line); }
.mk-bf__bar > i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--muted); }
.mk-bf__url { flex: 1 1 auto; height: 12px; margin-left: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.mk-bf__body { display: grid; gap: 8px; padding: 8px; }
.mk-bf .mk-grid { min-height: 150px; border: 0; }
.mk-slot { display: grid; place-items: center; min-height: 72px; padding: 6px; border: 1px dashed var(--muted); border-radius: 3px; text-align: center; }
.mk-devs { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; align-items: end; }
.mk-phone { padding: 8px 4px 6px; border: 2px solid var(--text-2); border-radius: 12px; background: var(--bg-alt); }
.mk-phone .mk-cell { min-height: 104px; }

/* ---- agency access (chapter 1, beat 3) ---- */
.mk-agency { flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.mk-agency b { font-weight: 600; color: var(--text); margin-right: 4px; }
.mk-agency .chip { padding: 2px 9px; }

/* ---- revoke: viewer tiles (chapter 1, beat 4) ---- */
.mk-viewers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: start; }
.mk-viewer { display: grid; gap: 6px; align-content: start; }
.mk-viewer .mk-cell { min-height: 74px; }
.mk-viewer .mk-cell__bar { font: 600 11.5px/1.4 var(--font); overflow-wrap: break-word; }
.mk-blank { position: absolute; inset: 22px 0 0 0; z-index: 2; display: grid; place-items: center; background: #0c0c0e; border: 1px dashed var(--muted); font-size: 12px; line-height: var(--lh-th); color: var(--text-2); }

/* ---- link card (chapter 1, beat 5) ---- */
.mk-linkcard { padding: 8px; border: 1px solid var(--text-2); border-radius: var(--radius-sm); background: var(--surface-2); }
.mk-linkcard .mk-lay { padding: 0; }
.mk-linkcard .mk-cell { min-height: 54px; }
.mk-linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---- views: tree + saved view + folder (chapter 2, beat 3) ---- */
.mk-views { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 10px; align-items: start; }
.mk-tree { display: grid; gap: 6px; }
.mk-tree__row { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); font-size: 12.5px; line-height: var(--lh-th); color: var(--text-2); overflow-wrap: break-word; }
.mk-views .mk-grid { min-height: 130px; }
.mk-folder { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); font-size: 12.5px; line-height: var(--lh-th); }
.mk-folder__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mk-folder__row::before { content: ""; width: 14px; height: 10px; flex: none; border: 1px solid var(--text-2); border-radius: 2px; }
.mk-folder__row--sub { margin-left: 22px; color: var(--text); }
.mk-folder__row--sub::before { width: 10px; height: 10px; border-radius: 50%; border-color: var(--text); background: rgba(255, 255, 255, .22); }

/* ---- map: pins by owner type, colour + shape (chapter 2, beat 5) ---- */
.mk-pin--c1 { background: var(--dw-video, #3F8CE8); }
.mk-pin--c2 { background: var(--dw-intr, #7B5FD6); border-radius: 2px; }
.mk-pin--c3 { background: var(--dw-bas, #B9C4FF); width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 0; border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.mk-lg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; line-height: var(--lh-th); color: var(--text-2); }
.mk-lg > b { font-weight: 600; color: var(--text); }
.mk-lg > span { display: inline-flex; align-items: center; gap: 6px; }
.mk-lg i { width: 12px; height: 12px; flex: none; border-radius: 50%; }
.mk-lg i.c1 { background: var(--dw-video, #3F8CE8); }
.mk-lg i.c2 { background: var(--dw-intr, #7B5FD6); border-radius: 2px; }
.mk-lg i.c3 { background: var(--dw-bas, #B9C4FF); border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 14px; height: 14px; }

/* ---- citizen request (chapter 3) ---- */
.mk-form { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); }
.mk-form > i { display: block; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.mk-form > i:nth-child(2) { width: 78%; }
.mk-form > i:nth-child(3) { width: 54%; }
.mk-step { gap: 8px; }
.mk-step > i { position: relative; width: 14px; height: 14px; }
.mk-step > i > b { position: absolute; inset: -1px; border-radius: 50%; background: var(--text); }
.mk-stepbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mk-env { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mk-envc { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-alt); font-size: 12.5px; line-height: var(--lh-th); color: var(--text); overflow-wrap: break-word; }
.mk-envc .mk-spark { height: 30px; }
.mk-envcam .mk-cell { min-height: 96px; }

/* ---- administration (chapter 4) ---- */
.mk-scan { position: relative; flex: 1 1 100px; height: 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-alt); overflow: hidden; overflow: clip; }
.mk-scan > i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--text) 0 2px, rgba(255, 255, 255, .14) 2px 28px, transparent 28px); }
.mk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.mk-report { display: grid; gap: 8px; }
.mk-code6 { display: inline-flex; gap: 5px; }
.mk-code6 > i { width: 18px; height: 24px; border: 1px solid var(--muted); border-radius: 4px; }

@media (max-width: 480px) {
  .mk-devs { grid-template-columns: minmax(0, 1fr) 72px; }
  .mk-views { grid-template-columns: 1fr; }
  .mk-viewers { gap: 6px; }
  .mk-viewer .mk-cell__bar { padding: 1px 4px; }
}
@media (min-width: 900px) {
  .pflow--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mk-viewer .mk-cap { align-self: stretch; justify-content: center; text-align: center; padding: 2px 6px; }
.mk-bf .mk-lay--16 .mk-cell__bar, .mk-phone .mk-cell__bar { white-space: nowrap; padding: 1px 3px; font-size: 10px; }
.mk-row .chip { max-width: 100%; }
