/* jarchi recording (recording.js): the «در حال ضبط» badge in the class header (everyone), the teacher's «ضبط»
   tile among the class tools, its confirmation, and the «ضبط‌ها» list. Recording is the danger family (red). */
:root { --rec: var(--danger); --rec-soft: var(--danger-soft); --rec-ink: var(--on-solid); }

.rec:empty { display: none; }

/* The badge: calm but unmistakable, with a slow pulsing dot. */
.rec-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 32px; padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--danger-soft); color: var(--danger-ink);
  border: 1px solid var(--danger-line);
  font-weight: 800; font-size: 13.5px; line-height: 1.4;
  white-space: nowrap;
}
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
/* The page is RTL: the timer sits left of «در حال ضبط»; the rule separates them. */
.rec-timer { border-right: 1px solid var(--danger-line); padding-right: 8px; }

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

/* The tile (a .tool in style.css) and its toggle. */
.rec-tool .rec-dot { animation: none; width: 14px; height: 14px; background: var(--muted); }
.rec-tool[data-on="1"] { background: var(--danger-soft); border-color: var(--danger-line); }
.rec-tool[data-on="1"] .tool-ic { background: var(--danger); }
.rec-tool[data-on="1"] .tool-ic .rec-dot { background: var(--on-solid); animation: rec-pulse 1.6s ease-in-out infinite; }
.rec-tool[data-on="1"] small { color: var(--danger-ink); }
.btn.rec-toggle { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--danger-ink); border-color: var(--danger-line); }
.rec-toggle .rec-dot { animation: none; }
.rec-toggle.on { background: var(--danger); color: var(--on-solid); border-color: var(--danger); }
.rec-toggle.on .rec-dot { background: var(--on-solid); border-radius: 2px; width: 9px; height: 9px; }
@media (hover: hover) {
  .btn.rec-toggle:where(:not(:disabled)):hover { background: var(--danger-soft); border-color: var(--danger); }
  .btn.rec-toggle.on:where(:not(:disabled)):hover { background: var(--danger-ink); }
}

.rec-below:empty { display: none; }
.rec-below .err:empty { display: none; }
.rec-confirm {
  margin-top: 12px;
  background: var(--danger-soft); border: 1px solid var(--danger-line);
  border-radius: var(--r); padding: 12px 14px;
}
.rec-confirm p { margin: 0 0 6px; }
.rec-confirm p:first-child { font-weight: 800; color: var(--danger-ink); }
.rec-confirm .hint { color: var(--ink); }
.rec-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.rec-yes { background: var(--danger); color: var(--on-solid); }
@media (hover: hover) { .btn.rec-yes:where(:not(:disabled)):hover { background: var(--danger-ink); } }

/* The «ضبط‌ها» list (teacher). */
.rec-card { margin-bottom: 0; }
.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; }
