/* Researcher recording UI. Light theme, existing admin tokens/colours. */
.rec-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #EFEDFF; color: #342B9B; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.rec-admin-setup .rec-admin-config[data-state="warn"] { color: #8a5200; background: #FFF1D6; padding: 8px 10px; border-radius: 8px; }
.rec-admin-setup .rec-admin-config[data-state="ok"] { color: #12794F; }
.rec-admin-fields { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.rec-admin-fields[disabled] { opacity: .55; }
.rec-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0; }
.rec-admin-grid input { width: 100%; }

.rec-admin-host { margin-top: 24px; }
.rec-admin-card { background: #fff; border: 1px solid #e4e7ec; border-radius: 14px; padding: 20px; }
.rec-admin-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.rec-admin-warn { background: #FFF1D6; color: #6b4000; padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.rec-admin-error { color: #C8283F; }
.rec-usage-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 12px 0 16px; }
.rec-usage-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.rec-usage-bar { height: 8px; border-radius: 99px; background: #EEF0F6; overflow: hidden; }
.rec-usage-bar span { display: block; height: 100%; background: #5146D8; }
.rec-usage[data-level="warning"] .rec-usage-bar span { background: #B26A00; }
.rec-usage[data-level="high"] .rec-usage-bar span, .rec-usage[data-level="critical"] .rec-usage-bar span { background: #C8283F; }
.rec-table-wrap { overflow-x: auto; }
.rec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rec-table th, .rec-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #EEF0F6; vertical-align: top; white-space: nowrap; }
.rec-table th { color: #566176; font-weight: 600; font-size: .8rem; }
.rec-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.rec-status { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: #EEF0F6; color: #303B52; }
.rec-status[data-status="recording"] { background: #FDE9EC; color: #9f1d31; }
.rec-status[data-status="processing"], .rec-status[data-status="pending"] { background: #FFF1D6; color: #6b4000; }
.rec-status[data-status="ready"] { background: #E3F6EC; color: #0d5c3c; }
.rec-status[data-status="failed"] { background: #FDE9EC; color: #9f1d31; }
.rec-status[data-status="deleted"] { background: #EEF0F6; color: #566176; }
.rec-flags { display: block; color: #566176; margin-top: 3px; white-space: normal; }
.rec-empty { color: #566176; }

.rec-player { margin-top: 20px; border-top: 1px solid #e4e7ec; padding-top: 16px; }
.rec-player-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.rec-player-head h4 { margin: 0; }
.rec-player-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .88rem; }
/* One row of equal-height controls: label and field side by side. */
.rec-player .rec-ctl { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: #303B52; }
.rec-player .rec-ctl-label { white-space: nowrap; }
.rec-player .rec-ctl select, .rec-player .rec-ctl input { box-sizing: border-box; height: 36px; margin: 0; padding: 0 10px; border: 1px solid #CDD2DC; border-radius: 8px; background: #fff; font: inherit; font-weight: 500; color: #172033; }
.rec-player .rec-ctl select { min-width: 76px; padding-right: 26px; }
.rec-player .rec-ctl-suffix { display: inline-flex; align-items: center; height: 36px; border: 1px solid #CDD2DC; border-radius: 8px; background: #fff; overflow: hidden; }
.rec-player .rec-ctl-suffix input { width: 76px; height: 34px; border: 0; border-radius: 0; text-align: right; }
.rec-player .rec-ctl-suffix > span { padding: 0 10px 0 4px; color: #566176; font-weight: 500; }
.rec-player .rec-ctl-suffix:focus-within { outline: 2px solid #5146D8; outline-offset: 1px; }
.rec-player .rec-ctl-suffix input:focus { outline: none; }
.rec-player .rec-ctl-btn { display: inline-flex; align-items: center; height: 36px; margin: 0; padding: 0 14px; border: 1px solid #CDD2DC; border-radius: 8px; background: #fff; color: #303B52; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rec-player .rec-ctl-btn:hover { background: #F6F7FB; }
.rec-player .rec-ctl-btn[aria-pressed="true"] { background: #EFEDFF; border-color: #7569EE; color: #342B9B; }
.rec-player .rec-ctl-btn:disabled { opacity: .5; cursor: default; }
.rec-player .rec-ctl-btn[hidden] { display: none; }
.rec-pointer-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 12px; font-size: .88rem; }
.rec-pointer-tools .rec-switch { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 600; cursor: pointer; }
.rec-pointer-tools .rec-switch input { margin: 0; flex: 0 0 auto; }
.rec-video-wrap { position: relative; margin-top: 10px; }
.rec-video-wrap video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #172033; border-radius: 10px; }
.rec-overlay { position: absolute; pointer-events: none; overflow: hidden; }
.rec-overlay[hidden] { display: none; }
.rec-area { position: absolute; }
.rec-area-handle { display: none; }
.rec-overlay.is-adjusting { pointer-events: auto; }
.rec-overlay.is-adjusting .rec-area { outline: 2px dashed #FFD84D; outline-offset: -2px; background: rgba(255,216,77,.12); cursor: move; touch-action: none; }
.rec-overlay.is-adjusting .rec-area-handle { display: block; position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; background: #FFD84D; border: 2px solid #172033; border-radius: 3px; cursor: nwse-resize; }
.rec-pointer-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: rgba(81,70,216,.85); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(23,32,51,.55), 0 2px 6px rgba(0,0,0,.35); transition: left 90ms linear, top 90ms linear; }
.rec-pointer-dot[hidden] { display: none; }
.rec-pointer-dot.is-click { background: #C8283F; box-shadow: 0 0 0 10px rgba(200,40,63,.3), 0 0 0 2px rgba(23,32,51,.55); }
.rec-timeline { position: relative; height: 40px; margin: 14px 0 6px; background: #F6F7FB; border: 1px solid #E3E6ED; border-radius: 8px; cursor: pointer; }
.rec-timeline-track { position: absolute; inset: 0; }
.rec-band { position: absolute; top: 4px; height: 14px; background: #EFEDFF; border: 1px solid #7569EE; border-radius: 4px; font-size: .68rem; color: #342B9B; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; line-height: 13px; }
.rec-mark { position: absolute; bottom: 5px; width: 3px; height: 14px; margin-left: -1px; border-radius: 2px; }
.rec-mark-click { background: #C8283F; }
.rec-mark-figma { background: #12794F; height: 9px; }
.rec-mark-life { background: #B26A00; height: 30px; bottom: 4px; }
.rec-playhead { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #172033; pointer-events: none; }
.rec-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: #566176; }
.rec-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.rec-legend .lg-task::before { background: #EFEDFF; border: 1px solid #7569EE; }
.rec-legend .lg-click::before { background: #C8283F; }
.rec-legend .lg-figma::before { background: #12794F; }
.rec-legend .lg-life::before { background: #B26A00; }
.rec-events { margin-top: 14px; }
.rec-events-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rec-events-head h5 { margin: 0; font-size: .95rem; }
.rec-event-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid #EEF0F6; border-radius: 8px; }
.rec-ev { display: grid; grid-template-columns: 56px 110px 1fr; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; background: none; border: 0; border-bottom: 1px solid #F1F2F6; font: inherit; font-size: .86rem; color: #172033; }
button.rec-ev { cursor: pointer; }
button.rec-ev:hover, button.rec-ev:focus-visible { background: #F6F7FB; }
.rec-ev-out { color: #566176; }
.rec-ev-time { font-variant-numeric: tabular-nums; color: #566176; }
.rec-ev-label { font-weight: 600; }
