/* Record a call or your screen (13.13, static/js/callrec.js): the dialog that starts it and the small bar that stays
   while the creator moves around the app. Card-free like the rest (flat.css): the dialog is plain lines and one
   hairline; only the bar floats, so only the bar is glass, as toasts are. Every colour is a token: both themes follow. */

/* ---------- the dialog ---------- */
.cr-lead { margin: 0 0 16px; line-height: 1.55; }
.cr-how { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2); }
.cr-how > b { color: var(--text-hi); font-weight: 650; }
.cr-mic { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); }
.cr-tell { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-hi);
  font-weight: 560; }
.cr-tell .icon { flex: none; margin-top: 2px; color: var(--accent-text); }
.cr-err { margin: 12px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--t-red); }
.cr-err[hidden] { display: none; }
.cr-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- the bar: the time, Pause or Resume, Stop ---------- */
.cr-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--rule);
  box-shadow: var(--shadow-pop); font-size: var(--fs-sm); color: var(--text); animation: crIn .28s var(--spring, ease-out);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
.cr-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--tally); box-shadow: 0 0 0 4px rgb(var(--ta) / .16);
  animation: crBeat 1.6s ease-in-out infinite; }
.cr-bar.paused .cr-dot { background: var(--text-3); box-shadow: none; animation: none; }
.cr-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; color: var(--text-hi); }
.cr-note { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cr-btns { display: flex; gap: 8px; flex: none; }
.cr-btns:empty { display: none; }
.cr-bar .btn { flex: none; }
.cr-bar:focus:not(:focus-visible) { outline: none; }
.cr-bar.flash { animation: crFlash .9s ease-out; }
@keyframes crIn { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes crBeat { 50% { opacity: .45; } }
@keyframes crFlash { 30% { box-shadow: 0 0 0 4px rgb(var(--ta) / .35), var(--shadow-pop); } }

/* phones never record (callrec.js offers an upload there); a narrow window keeps the bar inside its 16px gutters */
@media (max-width: 767px) {
  .cr-bar { left: 16px; right: 16px; transform: none; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .cr-note { flex: 1; }
  @keyframes crIn { from { opacity: 0; transform: translateY(12px); } }
}
@media (prefers-reduced-motion: reduce) {
  .cr-bar, .cr-dot, .cr-bar.flash { animation: none; }
}
