/* jarchi recording (recording.js): the red «در حال ضبط» badge, the teacher's toggle, confirmation and list. */
:root { --rec: #c92a2a; --rec-soft: #fde8e8; --rec-ink: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root { --rec: #ff6b6b; --rec-soft: #3b1f22; --rec-ink: #1d0b0c; }
}

.rec { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.rec:empty { display: none; }

.rec-badge {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rec); color: var(--rec-ink);
  border-radius: 12px; padding: 8px 14px;
  font-weight: 800; font-size: 15px;
}
.rec-badge .rec-dot { background: var(--rec-ink); }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; opacity: .9; direction: ltr; unicode-bidi: isolate; }
/* The page is RTL: the timer sits left of «در حال ضبط»; the rule separates them. */
.rec-timer { border-right: 1px solid currentColor; padding-right: 8px; }

.rec-dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--rec);
  animation: rec-pulse 1.4s ease-in-out infinite;
}
@keyframes rec-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }

.rec-bar { display: flex; justify-content: flex-start; }
.btn.rec-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--rec); border-color: var(--rec); }
.rec .err:empty { display: none; }
.rec-toggle .rec-dot { animation: none; }
.rec-toggle.on { background: var(--rec-soft); }
.rec-toggle.on .rec-dot { animation: rec-pulse 1.4s ease-in-out infinite; border-radius: 2px; }

.rec-confirm {
  background: var(--rec-soft); border: 1px solid var(--rec);
  border-radius: 14px; padding: 12px 14px;
}
.rec-confirm p { margin: 0 0 6px; }
.rec-confirm p:first-child { font-weight: 800; }
.rec-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.rec-yes { background: var(--rec); color: var(--rec-ink); }

.rec-card h2 { margin-bottom: 8px; }
.rec-items { list-style: none; padding: 0; margin: 0; }
.rec-items li { padding: 10px 0; border-top: 1px solid var(--line); }
.rec-items li:first-child { border-top: 0; }
.rec-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rec-meta { display: flex; flex-direction: column; min-width: 0; }
.rec-meta b { font-size: 15px; }
.rec-meta small { color: var(--muted); font-size: 13px; }
.rec-items audio { display: block; width: 100%; margin-top: 8px; }
.rec-items audio[hidden] { display: none; }
