/* Copyright © Rob Art | Illustration 2026 */
/* RobArt Paint Scope — panel styles. */

#racn {
	position: fixed; z-index: 2147483646; right: 16px; bottom: 16px;
	width: 408px; max-width: calc(100vw - 32px);
	height: 88vh; max-height: 88vh;
	display: none; flex-direction: column;
	background: #0f1622; color: #e9ecf1;
	border: 1px solid #26344a; border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0,0,0,.5);
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
	opacity: 0; transform: translateY(8px) scale(.99);
	transition: opacity .16s ease, transform .16s ease;
}
#racn.is-open { display: flex; opacity: 1; transform: none; }
/* Ghost mode — see-through so the page underneath stays visible with the panel open.
   Pointer events stay on so controls still work; hovering the panel restores full
   opacity briefly so you can read/click without leaving ghost mode. */
/* Ghost opacity — rest + hover are settable on Tools → CatchNet; the panel carries
   the saved values as inline --racn-ghost-rest / --racn-ghost-hover custom properties,
   falling back to these defaults. */
#racn.is-ghost { opacity: var(--racn-ghost-rest, .28); transition: opacity .18s ease; }
#racn.is-ghost:hover { opacity: var(--racn-ghost-hover, .92); }
/* Fixed (non-scrolling) rows keep their natural height; only the two scroll
   sections flex to share the remaining space. */
#racn__head, #racn__scrub, #racn__verdict, #racn__meta,
#racn__flags, #racn .racn-sechead { flex: 0 0 auto; }

/* Custom scrollbar (body) — subtle, on-brand. */
#racn__body { scrollbar-width: thin; scrollbar-color: #2c3d5c transparent; }
#racn__body::-webkit-scrollbar { width: 8px; }
#racn__body::-webkit-scrollbar-thumb { background: #2c3d5c; border-radius: 4px; }
#racn__body::-webkit-scrollbar-thumb:hover { background: #3a4f76; }

#racn__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #26344a; background: #131c2b; border-radius: 12px 12px 0 0; }
#racn__head b { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 system-ui, sans-serif; letter-spacing: .3px; }
#racn__head .sp { flex: 1; }
#racn__x { cursor: pointer; background: none; border: 0; color: #8a97ab; font-size: 16px; line-height: 1; }

#racn__scrub { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid #26344a; }
/* Fully custom range so the thumb sits FLUSH at both ends (native inset leaves a gap
   at 0% and short of 100%). appearance:none + a full-width track + a thumb whose travel
   WebKit anchors to the track edges (margin pulls it back by half its height). */
#racn__scrub input[type=range] {
	flex: 1; min-width: 0; height: 16px; margin: 0; padding: 0;
	-webkit-appearance: none; appearance: none;
	background: transparent; border: 0; outline: none; cursor: pointer;
}
/* Track — thin line */
#racn__scrub input[type=range]::-webkit-slider-runnable-track {
	height: 3px; border-radius: 2px; background: #d9e2f2; border: 0;
}
#racn__scrub input[type=range]::-moz-range-track {
	height: 3px; border-radius: 2px; background: #d9e2f2; border: 0;
}
/* Thumb */
#racn__scrub input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 14px; height: 14px; border-radius: 50%;
	background: #3a4f76; border: 0;
	margin-top: -5.5px;        /* centre the 14px thumb on the 3px track */
}
#racn__scrub input[type=range]::-moz-range-thumb {
	width: 14px; height: 14px; border-radius: 50%;
	background: #3a4f76; border: 0;
}
#racn__scrub input[type=range]:focus { outline: none; }
#racn__scrub input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(90,123,181,.45); }
#racn__scrub button { cursor: pointer; background: #1c2942; color: #cfe0ff; border: 1px solid #2c3d5c; border-radius: 6px; padding: 3px 8px; font: 600 12px system-ui; transition: background .12s ease; }
#racn__scrub button:hover { background: #26375a; }
#racn__scrub button:active { transform: translateY(1px); }
/* Opacity/ghost toggle — sits at the far right of the scrubber, set off by a divider. */
#racn__ghost { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; margin-left: 2px; border-left: 1px solid #26344a; border-radius: 6px; }
#racn__ghost svg { display: block; }
#racn__ghost.is-on { background: #234a7a; border-color: #3a6ba8; }

/* ── Phase 2.3: user watch list ─────────────────────────────────────────────── */
#racn__watch { flex: 0 0 auto; padding: 8px 12px; border-bottom: 1px solid #26344a; background: #101827; }
#racn__watch-tools { display: flex; align-items: center; gap: 6px; }
#racn__pick { cursor: pointer; white-space: nowrap; background: #16233a; color: #9fd0ff; border: 1px solid #2c3d5c; border-radius: 6px; padding: 4px 9px; font: 700 11px system-ui; transition: background .12s ease; }
#racn__pick:hover { background: #1e3050; }
#racn__pick.is-picking { background: #234a7a; color: #d7ecff; border-color: #3a6ba8; }
#racn__watch-input { flex: 1; min-width: 60px; background: #0a1019; color: #e9ecf1; border: 1px solid #26344a; border-radius: 6px; padding: 4px 8px; font: 12px ui-monospace, Menlo, monospace; }
#racn__watch-input:focus { outline: none; border-color: #3a6ba8; }
#racn__watch-add { cursor: pointer; background: #12261c; color: #8fe0ab; border: 1px solid #23402e; border-radius: 6px; padding: 4px 10px; font: 700 11px system-ui; }
#racn__watch-add:hover { background: #16331f; }
#racn__watch-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#racn__watch-list:empty { display: none; }
#racn__watch-list .wchip { display: inline-flex; align-items: center; gap: 6px; background: #1a2436; border: 1px solid #2c3d5c; border-radius: 12px; padding: 2px 6px 2px 10px; color: #cfe0ff; font: 11px ui-monospace, Menlo, monospace; max-width: 100%; }
#racn__watch-list .wchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
#racn__watch-list .wchip button { cursor: pointer; background: none; border: 0; color: #7f8ea6; font-size: 13px; line-height: 1; padding: 0 2px; }
#racn__watch-list .wchip button:hover { color: #ff9db0; }
#racn__watch-hint { margin-top: 7px; color: #5f7396; font: 10px system-ui; }
/* The crosshair highlight that follows the cursor while picking. */
#racn__pick-hl { position: fixed; z-index: 2147483645; pointer-events: none; border: 2px solid #4a9eff; background: rgba(74,158,255,.14); border-radius: 3px; box-shadow: 0 0 0 1px rgba(74,158,255,.4); display: none; }
#racn__pick-tip { position: fixed; z-index: 2147483645; pointer-events: none; background: #0a1019; color: #9fd0ff; border: 1px solid #3a6ba8; border-radius: 4px; padding: 2px 6px; font: 11px ui-monospace, Menlo, monospace; display: none; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Phase 3: Visual / filmstrip (Pro) ──────────────────────────────────────── */
#racn .racn-pro { background: #3a2a12; color: #ffd479; border: 1px solid #6b4e1e; border-radius: 4px; padding: 0 5px; font: 700 8px/14px system-ui; letter-spacing: .5px; vertical-align: middle; }
#racn__visual { flex: 0 0 auto; padding: 8px 12px; border-bottom: 1px solid #26344a; background: #101827; max-height: 40vh; overflow-y: auto; }
#racn__visual-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
#racn__visual-tools button { cursor: pointer; background: #16233a; color: #9fd0ff; border: 1px solid #2c3d5c; border-radius: 6px; padding: 4px 9px; font: 700 11px system-ui; transition: background .12s ease; }
#racn__visual-tools button:hover { background: #1e3050; }
#racn__visual-tools button:disabled { opacity: .5; cursor: default; }
#racn__visual-tools .lbl { color: #7f8ea6; font: 10px system-ui; }
#racn .lbl { color: #8a97ab; font: 10px system-ui; }
#racn__filmstrip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #2c3d5c transparent; }
#racn__filmstrip:empty { display: none; }
#racn__filmstrip .fst { flex: 0 0 auto; width: 92px; cursor: pointer; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: #0a1019; transition: border-color .12s ease; position: relative; }
#racn__filmstrip .fst:hover { border-color: #3a6ba8; }
#racn__filmstrip .fst.is-current { border-color: #4a9eff; }
#racn__filmstrip .fst.has-finding { box-shadow: inset 0 -3px 0 #d1394c; }
#racn__filmstrip .fst img { display: block; width: 100%; height: auto; }
#racn__filmstrip .fst .fst-cap { font: 9px ui-monospace, Menlo, monospace; color: #9fb0c8; text-align: center; padding: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#racn__filmstrip .fst .fst-empty { height: 56px; display: flex; align-items: center; justify-content: center; color: #45566f; font: 18px system-ui; }
#racn__visual-hint { display: block; margin-top: 8px; }

/* ── Modal viewer (Pro) — a pop-out big view with prev/next + download. ─────── */
#racn-modal { position: fixed; inset: 0; z-index: 2147483647; display: none; align-items: center; justify-content: center; background: rgba(6,10,18,.72); }
#racn-modal.is-open { display: flex; }
#racn-modal .racn-modal__box { display: flex; flex-direction: column; max-width: 92vw; max-height: 92vh; background: #0f1622; border: 1px solid #2c3d5c; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.6); overflow: hidden; }
#racn-modal .racn-modal__bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #26344a; background: #131c2b; }
#racn-modal .racn-modal__label { color: #cfe0ff; font: 600 12px ui-monospace, Menlo, monospace; }
#racn-modal .racn-modal__sp { flex: 1; }
#racn-modal button { cursor: pointer; background: #1c2942; color: #cfe0ff; border: 1px solid #2c3d5c; border-radius: 6px; padding: 3px 10px; font: 700 13px system-ui; transition: background .12s ease; }
#racn-modal button:hover { background: #26375a; }
#racn-modal button:disabled { opacity: .4; cursor: default; }
#racn-modal .racn-modal__img { overflow: auto; padding: 12px; background: #0a1019; }
#racn-modal .racn-modal__img img { display: block; max-width: 100%; height: auto; border: 1px solid #26344a; border-radius: 4px; }
#racn-modal .racn-modal__pending { color: #8a97ab; padding: 40px; text-align: center; font: 12px ui-monospace, Menlo, monospace; }

#racn__verdict { padding: 10px 12px; border-bottom: 1px solid #26344a; background: #131c2b; font: 12px/1.45 ui-monospace, Menlo, monospace; }
#racn__verdict.bad { background: #2a1119; }
#racn__verdict.good { background: #12241a; color: #8fe0ab; }
#racn__verdict b { color: #ffd479; font: 700 11px system-ui; text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 3px; }
#racn__verdict .sel { color: #ff9db0; font-weight: 700; }

/* Findings grows to fit its content but is CAPPED at ~45% of the viewport, so a long
   list can't push Frame detail off-screen. Below the cap it sizes to content (flex
   basis auto); the cap is the guarantee that both sections stay reachable. */
#racn__findings { flex: 1 1 0; min-height: 72px; padding: 4px 12px; border-bottom: 1px solid #1b2536; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2c3d5c transparent; }
/* A collapsed section must NOT keep taking flex space — pin it to nothing. */
#racn .racn-sechead.is-collapsed + #racn__findings,
#racn .racn-sechead.is-collapsed + #racn__body { flex: 0 0 0; min-height: 0; }
#racn__findings::-webkit-scrollbar { width: 8px; }
#racn__findings::-webkit-scrollbar-thumb { background: #2c3d5c; border-radius: 4px; }
#racn__findings .fnd { margin: 5px 0; padding: 5px 8px; border-radius: 6px; background: #1a2436; border: 1px solid #26344a; cursor: pointer; transition: background .12s ease, border-color .12s ease; }
#racn__findings .fnd:hover { background: #22304a; border-color: #34456a; }
#racn__findings .fnd .ttl { color: #cfe0ff; font-weight: 700; }
#racn__findings .fnd .cf { float: right; color: #7f8ea6; }
#racn__findings .fnd .sel { color: #ffd479; }
/* Dismissed finding — muted, struck. */
#racn__findings .fnd.is-dismissed { opacity: .4; }
#racn__findings .fnd.is-dismissed .ttl { text-decoration: line-through; }
#racn__findings .fnd__dismiss { float: right; margin-left: 8px; cursor: pointer; color: #6b7a92; border: 0; background: none; font-size: 13px; line-height: 1; }
#racn__findings .fnd__dismiss:hover { color: #ffb4c0; }

#racn__meta { padding: 6px 12px; color: #9fb0c8; border-bottom: 1px solid #1b2536; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#racn__meta .frame-tag { color: #7fd1a2; font-weight: 700; }
#racn__meta .sp { flex: 1; }

#racn__repro { cursor: pointer; background: #3a2a12; color: #ffd479; border: 1px solid #6b4e1e; border-radius: 6px; padding: 3px 10px; font: 700 11px system-ui; white-space: nowrap; transition: background .12s ease; }
#racn__repro:hover { background: #4a370f; }
#racn__repro.is-on { background: #5b2531; color: #ffb4c0; border-color: #8a3a48; }

/* Copy report — sits opposite Reproduce, for pasting into an AI/dev chat. */
#racn__copy { cursor: pointer; background: #12261c; color: #8fe0ab; border: 1px solid #23402e; border-radius: 6px; padding: 3px 10px; font: 700 11px system-ui; white-space: nowrap; transition: background .12s ease; }
#racn__copy:hover { background: #16331f; }
#racn__copy.is-done { background: #1c3a26; color: #b6f0c8; border-color: #2e5a3c; }

#racn__flags { padding: 0 12px; }
#racn__flags .flag { margin: 6px 0; padding: 6px 8px; border-radius: 6px; background: #3a1720; color: #ffb4c0; border: 1px solid #5b2531; }
#racn__flags .flag.ok { background: #14251b; color: #8fe0ab; border-color: #23402e; }

/* Frame detail takes whatever height is left after the (capped) Findings section,
   with a floor so it's always usable; it scrolls internally. */
#racn__body { flex: 1 1 0; min-height: 72px; overflow: auto; padding: 4px 12px 12px; }
#racn__body pre { white-space: pre-wrap; word-break: break-word; margin: 4px 0 10px; padding: 8px; background: #0a1019; border: 1px solid #1b2536; border-radius: 6px; }
#racn__body h4 { margin: 12px 0 4px; font: 700 11px system-ui; color: #6ea8ff; text-transform: uppercase; letter-spacing: .5px; }

#racn .win { color: #e9ecf1; }
#racn .win .sel { color: #ffd479; }
#racn .win .sheet { color: #7f8ea6; }
#racn .win.override { background: #2a1a0e; }

#racn__empty { padding: 20px; text-align: center; color: #8a97ab; }

/* Collapsible sections — a header bar with a chevron above each scrolling region,
   so the panel can be shrunk when a section isn't needed. */
#racn .racn-sechead { display: flex; align-items: center; gap: 6px; padding: 5px 12px; cursor: pointer; user-select: none; background: #101827; border-bottom: 1px solid #1b2536; color: #8ea3c2; font: 700 10px/1 system-ui; text-transform: uppercase; letter-spacing: .5px; }
#racn .racn-sechead:hover { background: #14203250; color: #b3c6e4; }
#racn .racn-sechead .racn-chev { display: inline-block; transition: transform .15s ease; color: #5f7396; font-size: 11px; }
#racn .racn-sechead .racn-sec-n { margin-left: auto; color: #5f7396; font-weight: 400; }
/* When collapsed: rotate the chevron and hide the controlled region. */
#racn .racn-sechead.is-collapsed .racn-chev { transform: rotate(-90deg); }
#racn .racn-sechead.is-collapsed + * { display: none !important; }

/* Admin-bar badge — red dot + count when a page loads with findings. */
#wp-admin-bar-racn-toggle .racn-badge {
	display: none; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px;
	border-radius: 8px; background: #d1394c; color: #fff;
	font: 700 10px/16px system-ui; text-align: center; vertical-align: middle;
	box-shadow: 0 0 8px rgba(209,57,76,.6);
}
#wp-admin-bar-racn-toggle.has-findings .racn-badge { display: inline-block; }
#wp-admin-bar-racn-toggle.has-findings .ab-item { color: #ff9db0 !important; }

/* On-page notice shown while scrubbing when the current frame carries a finding —
   the live page can't re-draw a transient bug, so this flags it and points to the
   filmstrip. Sits top-centre, clear of the panel (bottom-right). */
#racn-frame-notice {
	position: fixed; z-index: 2147483645; top: 40px; left: 50%; transform: translateX(-50%) translateY(-8px);
	display: none; align-items: center; gap: 10px;
	max-width: min(680px, 90vw); padding: 10px 16px;
	background: #2a1119; color: #ffd7de; border: 1px solid #8a3a48; border-radius: 10px;
	box-shadow: 0 14px 40px rgba(0,0,0,.5);
	font: 13px/1.4 ui-monospace, Menlo, monospace; opacity: 0; transition: opacity .16s ease, transform .16s ease;
	pointer-events: none;
}
#racn-frame-notice.is-on { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
#racn-frame-notice .racn-fn__i { color: #ff9db0; font-size: 22px; line-height: 1; flex: 0 0 auto; }
#racn-frame-notice .racn-fn__t { font-weight: 700; color: #fff; }
#racn-frame-notice .racn-fn__hint { color: #d9a7b0; font-size: 11px; }

/* Free-tier variant of the bug notice — amber (upgrade prompt) vs the Pro red. */
#racn-frame-notice.is-free { background: #2a2011; color: #ffe6b3; border-color: #6b4e1e; }
#racn-frame-notice.is-free .racn-fn__i { color: #ffd479; }
#racn-frame-notice.is-free .racn-fn__hint { color: #d9c08a; }
