/* jarchi help lane: the first-class coach bubbles (coach.js) and «گزارش مشکل» outside the class (report.js; the
   sheet itself borrows feedback.css's .fb-panel). */

/* ---------- a bubble beside its button; no dim over the lesson ---------- */
.coach {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: min(300px, calc(100vw - 16px));
  padding: 12px 14px 10px;
  background: var(--tip-bg); color: var(--tip-ink);
  border-radius: var(--r-pop, 14px);
  box-shadow: var(--shadow-3);
  font-size: var(--fs-meta); line-height: 1.6;
  animation: coach-in var(--t-med, 180ms) var(--ease, ease-out);
}
.coach::after {
  /* the arrow, pointing at the button's middle (--arrow-x from the inline start of the bubble's box) */
  content: ""; position: absolute; left: calc(var(--arrow-x, 50%) - 8px);
  width: 16px; height: 16px; background: inherit; transform: rotate(45deg); border-radius: 3px;
}
.coach[data-side="above"]::after { bottom: -6px; }
.coach[data-side="below"]::after { top: -6px; }
.coach p { margin: 0; }
.coach-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px !important; }
.coach-title b { font-size: var(--fs-body); font-weight: var(--fw-x, 800); }
.coach-title small { opacity: 0.75; font-size: var(--fs-micro); }
.coach-text { opacity: 0.92; }
.coach-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; position: relative; z-index: 1; }
.coach-row .btn { min-height: 40px; padding-inline: 18px; }
.coach-skip {
  appearance: none; border: 0; background: transparent; color: inherit; opacity: 0.8;
  font: inherit; font-size: var(--fs-meta); min-height: 40px; padding: 0 10px; cursor: pointer; border-radius: var(--r-pill, 999px);
}
.coach-skip:hover { opacity: 1; text-decoration: underline; }
.coach :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* The button the bubble talks about: a soft ring that breathes twice, then stays still. */
.coach-ring {
  position: fixed; z-index: 59; pointer-events: none;
  border-radius: var(--r-ctl, 12px);
  box-shadow: 0 0 0 3px var(--accent);
  animation: coach-ring 1.4s var(--ease, ease-out) 2;
}
@keyframes coach-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes coach-ring { 0% { box-shadow: 0 0 0 3px var(--accent); } 50% { box-shadow: 0 0 0 7px var(--accent-soft); } 100% { box-shadow: 0 0 0 3px var(--accent); } }
@media (prefers-reduced-motion: reduce) { .coach, .coach-ring { animation: none; } }

/* ---------- «گزارش مشکل» on a problem screen ---------- */
.rp-link { display: inline-flex; align-items: center; gap: 6px; }
.rp-link .rp-ic, .rp-ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rp-panel textarea { min-height: 88px; }
.rejoin .rp-link { margin-inline-start: 4px; }
.rp-inline {
  appearance: none; border: 0; background: none; padding: 0 4px; min-height: 32px; cursor: pointer;
  color: var(--accent-ink); font: inherit; font-weight: var(--fw-b, 700); text-decoration: underline; text-underline-offset: 3px;
}
.rp-inline .rp-ic { display: none; }
/* «راهنما» in «بیشتر» is a link (a new tab): it reads like the rows around it. */
a.more-row { text-decoration: none; color: inherit; }
/* The bar's signal icon in a sentence: the bars alone (the cross is the "cut" state's). */
.ic-chip .sg-x { display: none; }

/* ---------- «راهنما» over the class (coach.js): the whole screen on a phone, a side panel on a computer ---------- */
.help-frame {
  position: fixed; z-index: 65; inset: 0;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  background: var(--bg); color: var(--ink);
  padding-top: env(safe-area-inset-top);
  animation: coach-in var(--t-med, 180ms) var(--ease, ease-out);
}
@media (min-width: 900px) {
  .help-frame { inset: 0 auto 0 0; width: min(460px, 40vw); border-inline-start: 1px solid var(--line); box-shadow: var(--shadow-3); }
}
.help-frame-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.help-frame-bar b { font-size: var(--fs-lead); }
.help-frame-bar .btn { width: auto; }
.help-frame iframe { flex: 1 1 auto; width: 100%; border: 0; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { .help-frame { animation: none; } }
