/* ============================================================================
   jp-scribe-capture.css — M0 live capture
   Branded shell for: entry CTA · REC bar (real mic waveform) · two-column live
   transcript with relabel · waiting/drafting stage · honesty banner · modals.
   Dark theme first; light-theme fixes at the foot. Zero emoji.
   ============================================================================ */
.jpc-capbtn .sic, .jpc-stop .sic, .jpc-spk-chip .sic, .jpc-honesty .sic, .jpc-modal-icon .sic, .jpc-mbtn .sic, .jpc-relabel .sic, .jpc-stage-mic .sic { width: 1em; height: 1em; flex: 0 0 auto; }

/* ── entry CTA: the lead "this is real" action — centered, above the rest ─── */
.gen-actions { flex-direction: column; align-items: center; row-gap: 11px; }
/* all three entry buttons share one width so the stack reads as a clean column */
.gen-actions .jpc-capbtn,
.gen-actions #jpsLiveBtn,
.gen-actions #generateBtn { width: 100%; max-width: 290px; justify-content: center; }
.jpc-capbtn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 26px; border-radius: 14px; cursor: pointer;
  border: none; font-family: inherit; font-size: 15px; font-weight: 800; letter-spacing: .01em;
  background: linear-gradient(135deg, #16E0D5 0%, #00C9C0 42%, #0A2D6E 165%); color: #04102A;
  box-shadow: 0 12px 30px rgba(0,201,192,.40); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.jpc-capbtn .sic { font-size: 17px; }
/* a subtle sheen that sweeps across on hover */
.jpc-capbtn::after { content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); transition: left .55s ease; pointer-events: none; }
.jpc-capbtn:hover { transform: translateY(-2px) scale(1.015); filter: brightness(1.06) saturate(1.05); box-shadow: 0 18px 40px rgba(0,201,192,.52); }
.jpc-capbtn:hover::after { left: 120%; }
.jpc-capbtn:active { transform: translateY(0) scale(.995); }
/* with a real-capture CTA present, the scripted live + instant paths sit below, centered */
.gen-actions .jpc-capbtn ~ #jpsLiveBtn,
.gen-actions .jpc-capbtn ~ #generateBtn {
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.18); box-shadow: none;
}
html[data-theme="light"] .gen-actions .jpc-capbtn ~ #jpsLiveBtn,
html[data-theme="light"] .gen-actions .jpc-capbtn ~ #generateBtn {
  background: rgba(10,45,110,.05); color: #0A2D6E; border-color: rgba(10,45,110,.16);
}

/* ── REC bar (sits above the transcript scroll area) ────────────────────── */
.jpc-recbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 8px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(239,68,68,.10), rgba(10,45,110,.16));
  border: 1px solid rgba(239,68,68,.30);
}
.jpc-rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: jpcRec 1.4s ease-out infinite; flex: 0 0 auto; }
@keyframes jpcRec { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.jpc-rec-state { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #FCA5A5; text-transform: uppercase; white-space: nowrap; }
.jpc-rec-state .jpc-timer { color: #fff; margin-left: 4px; font-variant-numeric: tabular-nums; }
.jpc-wave { width: 132px; height: 22px; opacity: .95; }
.jpc-lang { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #00C9C0; background: rgba(0,201,192,.12); border: 1px solid rgba(0,201,192,.30); border-radius: 7px; padding: 2px 7px; }
.jpc-spk-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: #FBBF24; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.30); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
/* real streaming diarization (Deepgram/AssemblyAI) — confident teal, not amber estimate */
.jpc-spk-chip.diarized { color: #00C9C0; background: rgba(0,201,192,.12); border-color: rgba(0,201,192,.32); }
.jpc-stop {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 800; color: #fff; background: #EF4444; border: none; border-radius: 10px; padding: 8px 14px; min-height: 36px;
  box-shadow: 0 6px 16px rgba(239,68,68,.32); transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.jpc-stop:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 9px 22px rgba(239,68,68,.42); }
.jpc-stop:active { transform: translateY(0); }

/* ── live transcript: interim + relabel ─────────────────────────────────── */
.jpc-streamin { opacity: 0; transform: translateY(6px); transition: opacity .28s ease, transform .28s ease; }
.jpc-streamin.shown { opacity: 1; transform: none; }
.jpc-interim { opacity: .62; }
.jpc-interim .t-bubble { font-style: italic; border-style: dashed !important; }
.jpc-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #00C9C0; animation: jpcBlink 1s steps(2,start) infinite; }
@keyframes jpcBlink { 50% { opacity: 0; } }
.jpc-turn .t-speaker { position: relative; }
.jpc-relabel {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 7px; padding: 0; width: 18px; height: 18px;
  cursor: pointer; border-radius: 6px; color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); transition: color .14s, background .14s, border-color .14s;
  vertical-align: -3px;
}
.jpc-relabel .sic { font-size: 12px; }
.jpc-relabel:hover { color: #00C9C0; background: rgba(0,201,192,.12); border-color: rgba(0,201,192,.4); }

/* ── right-panel stage: recording / drafting ────────────────────────────── */
.jpc-stage { flex: 1; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 36px 22px; text-align: center; }
.jpc-stage-mic { position: relative; width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #00C9C0; background: rgba(0,201,192,.10); border: 1px solid rgba(0,201,192,.26); }
.jpc-stage-mic .sic { font-size: 26px; }
.jpc-stage-mic.drafting { animation: jpcSpin 1.5s linear infinite; }
@keyframes jpcSpin { to { transform: rotate(360deg); } }
.jpc-stage-ring { position: absolute; inset: -6px; border-radius: 24px; border: 2px solid rgba(0,201,192,.4); animation: jpcRing 1.8s ease-out infinite; }
@keyframes jpcRing { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.jpc-stage-h { font-size: 14px; font-weight: 800; color: rgba(255,255,255,.9); letter-spacing: -.01em; }
.jpc-stage-s { font-size: 12px; color: rgba(255,255,255,.42); max-width: 280px; line-height: 1.6; }
.jpc-wave-bars { display: inline-flex; align-items: flex-end; gap: 4px; height: 26px; }
.jpc-wave-bars i { width: 4px; height: 30%; border-radius: 2px; background: linear-gradient(180deg, #00C9C0, #0A2D6E); animation: jpcBar 1s ease-in-out infinite; }
.jpc-wave-bars i:nth-child(2) { animation-delay: .12s; } .jpc-wave-bars i:nth-child(3) { animation-delay: .24s; }
.jpc-wave-bars i:nth-child(4) { animation-delay: .36s; } .jpc-wave-bars i:nth-child(5) { animation-delay: .48s; }
.jpc-wave-bars i:nth-child(6) { animation-delay: .6s; } .jpc-wave-bars i:nth-child(7) { animation-delay: .72s; }
@keyframes jpcBar { 0%,100% { height: 24%; } 50% { height: 100%; } }

/* ── honesty banner above the captured note ─────────────────────────────── */
.jpc-honesty {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 13px; border-radius: 11px; margin-bottom: 4px;
  font-size: 11.5px; line-height: 1.55; font-weight: 600; color: #FCD34D;
  background: rgba(251,191,36,.09); border: 1px solid rgba(251,191,36,.26);
}
.jpc-honesty .sic { color: #FBBF24; font-size: 15px; margin-top: 1px; }
/* with real streaming diarization the note is engine-backed → teal, still review-before-sign */
.jpc-honesty.stream { color: #7FE7E1; background: rgba(0,201,192,.08); border-color: rgba(0,201,192,.26); }
.jpc-honesty.stream .sic { color: #00C9C0; }

/* ── branded modal ──────────────────────────────────────────────────────── */
.jpc-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(4,10,26,.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .18s ease; }
.jpc-modal.on { opacity: 1; }
.jpc-modal-card {
  position: relative; width: 100%; max-width: 430px; border-radius: 20px;
  background: radial-gradient(120% 80% at 50% -10%, rgba(0,201,192,.10), transparent 60%), linear-gradient(180deg, #0C1F44, #0A1A3A);
  border: 1px solid rgba(0,201,192,.24);
  padding: 22px 24px 20px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transform: translateZ(0) scale(.97); transition: transform .18s ease; isolation: isolate;
}
.jpc-modal.on .jpc-modal-card { transform: translateZ(0) scale(1); }
.jpc-modal-card.jpc-warn { border-color: rgba(251,191,36,.32); }
/* subtle brand lockup, top-centered */
.jpc-modal-brand { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; opacity: .9; }
.jpc-modal-brand .jpc-mark { width: 20px; height: 20px; }
.jpc-modal-brand span { font-size: 12px; font-weight: 800; letter-spacing: .01em; color: rgba(255,255,255,.7); }
html[data-theme="light"] .jpc-modal-brand span { color: #46566F; }
.jpc-modal-icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  color: #00C9C0; background: rgba(0,201,192,.12); border: 1px solid rgba(0,201,192,.28); }
.jpc-modal-card.jpc-warn .jpc-modal-icon { color: #FBBF24; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.3); }
.jpc-modal-h { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -.01em; margin-bottom: 8px; }
.jpc-modal-body { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.6; }
.jpc-m-body { margin-bottom: 12px; }
.jpc-m-demo { display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 10px 12px; border-radius: 11px;
  background: rgba(0,201,192,.07); border: 1px solid rgba(0,201,192,.2); font-size: 11.5px; line-height: 1.5; color: rgba(255,255,255,.74); }
.jpc-m-demo .sic { color: #00C9C0; font-size: 15px; margin-top: 1px; flex: 0 0 auto; }
.jpc-m-seed { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.62); }
.jpc-seg { display: inline-flex; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 3px; }
.jpc-seg button { font-family: inherit; font-size: 12px; font-weight: 800; border: none; background: transparent; color: rgba(255,255,255,.6); padding: 5px 14px; border-radius: 8px; cursor: pointer; }
.jpc-seg button.on { background: #00C9C0; color: #04102A; }
.jpc-modal-btns { display: flex; gap: 10px; justify-content: stretch; margin-top: 22px; }
.jpc-mbtn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; border-radius: 12px; padding: 12px 18px; min-height: 46px; transition: transform .14s ease, filter .14s ease, box-shadow .14s ease, background .14s ease; }
.jpc-mbtn.primary { background: linear-gradient(135deg, #16E0D5, #00B6AD); color: #04102A; border: none; box-shadow: 0 10px 24px rgba(0,201,192,.34); }
.jpc-mbtn.primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 13px 30px rgba(0,201,192,.44); }
.jpc-mbtn.ghost { background: rgba(255,255,255,.07); color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.18); }
.jpc-mbtn.ghost:hover { background: rgba(255,255,255,.12); }
.jpc-mbtn .sic { font-size: 14px; }
html[data-theme="light"] .jpc-mbtn.ghost { background: rgba(10,45,110,.05); color: #46566F; border-color: rgba(10,45,110,.16); }

/* ── M3 compliance consent modal ────────────────────────────────────────── */
.jpc-rulebox { text-align: left; background: rgba(0,201,192,.06); border: 1px solid rgba(0,201,192,.2); border-radius: 11px; padding: 11px 13px; margin-bottom: 12px; font-size: 12px; color: rgba(255,255,255,.78); }
.jpc-sel { font-family: inherit; font-size: 12px; font-weight: 700; color: #00C9C0; background: rgba(0,201,192,.1); border: 1px solid rgba(0,201,192,.3); border-radius: 8px; padding: 3px 8px; margin-left: 6px; cursor: pointer; }
.jpc-rule { margin-top: 8px; line-height: 1.5; }
.jpc-rule small { display: block; margin-top: 4px; font-size: 10.5px; color: rgba(255,255,255,.45); }
.jpc-checks { text-align: left; display: flex; flex-direction: column; gap: 9px; margin-bottom: 4px; }
.jpc-checks.jpc-need { animation: jpcShake .4s; }
@keyframes jpcShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.jpc-chk { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.82); cursor: pointer; }
.jpc-chk input { margin-top: 2px; width: 15px; height: 15px; accent-color: #00C9C0; flex: 0 0 auto; }
.jpc-chk.optional span { color: rgba(255,255,255,.62); }
.jpc-retnote { font-size: 11px; color: rgba(255,255,255,.5); padding: 6px 0 2px; line-height: 1.5; }
.jpc-blockers { text-align: left; list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.jpc-blockers li { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #FBBF24; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.26); border-radius: 9px; padding: 7px 11px; }
.jpc-blockers .sic { color: #FBBF24; }
html[data-theme="light"] .jpc-rulebox { color: #46566F; }
html[data-theme="light"] .jpc-rule small { color: #5A6B8C; }
html[data-theme="light"] .jpc-chk { color: #0A2540; }
html[data-theme="light"] .jpc-retnote { color: #5A6B8C; }

/* ── light theme ────────────────────────────────────────────────────────── */
html[data-theme="light"] .jpc-recbar { background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(0,201,192,.06)); border-color: rgba(239,68,68,.28); }
html[data-theme="light"] .jpc-rec-state { color: #DC2626; }
html[data-theme="light"] .jpc-rec-state .jpc-timer { color: #0A2540; }
html[data-theme="light"] .jpc-relabel { color: #5A6B8C; background: rgba(10,37,64,.04); border-color: rgba(10,37,64,.14); }
html[data-theme="light"] .jpc-stage-h { color: #0A2540; }
html[data-theme="light"] .jpc-stage-s { color: #5A6B8C; }
html[data-theme="light"] .jpc-honesty { color: #92702A; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.36); }
html[data-theme="light"] .jpc-modal-card { background: #fff; border-color: rgba(0,201,192,.28); box-shadow: 0 30px 80px rgba(10,37,64,.25); }
html[data-theme="light"] .jpc-modal-h { color: #0A2540; }
html[data-theme="light"] .jpc-modal-body { color: #46566F; }
html[data-theme="light"] .jpc-m-demo { color: #46566F; }
html[data-theme="light"] .jpc-m-seed { color: #46566F; }
html[data-theme="light"] .jpc-seg { background: rgba(10,37,64,.04); border-color: rgba(10,37,64,.14); }
html[data-theme="light"] .jpc-seg button { color: #46566F; }
html[data-theme="light"] .jpc-seg button.on { color: #04102A; }
html[data-theme="light"] .jpc-mbtn.ghost { color: #46566F; background: rgba(10,37,64,.05); border-color: rgba(10,37,64,.14); }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .jpc-recbar { gap: 7px; padding: 8px 10px; }
  .jpc-wave { width: 96px; }
  .jpc-spk-chip { display: none; }
  .jpc-stop span { display: none; }
  .jpc-stop { padding: 8px 11px; }
}
