/* layers.css — the layer chips shared by the book reader and the naat reader (static/layers.js qamarLayers; bilingual
   plan §2.2 / §3, a qamar-common 1.8.0 candidate: .qc-layers, .qc-layer, .qc-view-toggle, .qc-tr-badge, .qc-gap-row).
   A chip is a toggle: pressed = filled (accent) with a tick, not pressed = outlined with an empty box, and its label is
   a pair (lead language first, lang.css). Text chips sit in one group; the scan toggle stands apart after a rule. Tokens
   only (web/css-allow.txt "layers.css"). */
.qc-layerbar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qc-layers { display: inline-flex; gap: 6px; align-items: stretch; }
.qc-layer-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--border); }
.qc-layer { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; padding: 2px 14px 2px 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-pill); background: var(--bg); color: var(--fg); cursor: pointer;
  font: inherit; line-height: 1.2; white-space: nowrap; transition: background var(--dur), border-color var(--dur), color var(--dur); }
.qc-layer:hover { border-color: var(--accent); }
.qc-layer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qc-layer .bi > .ur { font-family: var(--font-ur); font-size: var(--fs-ur-caption); line-height: 1.7; }
.qc-layer .bi > .en { font-family: var(--font-en); font-size: var(--fs-caption); }
/* the box: empty when off, a tick when on (the state never rests on colour alone) */
.qc-layer-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border: 1.5px solid currentColor; border-radius: 5px; font: 700 var(--fs-xs)/1 var(--font-en); opacity: .7; }
.qc-layer[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 13%, var(--bg)); border-color: var(--accent); color: var(--accent-2); }
.qc-layer[aria-pressed="true"] .qc-layer-box { opacity: 1; background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.qc-layer[aria-pressed="false"] { color: var(--fg-2); }
.qc-layer[aria-pressed="true"] .qc-layer-box::before { content: "✓"; }
.qc-layer:disabled { opacity: .45; cursor: not-allowed; }
/* a small mark on a chip: this page has that layer (filled) / has none (hollow) */
.qc-layer-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .8; }
.qc-layer-dot.has { background: currentColor; }
.qc-layer-dot[hidden] { display: none; }
/* refused (the last text layer cannot go off): one short wobble */
.qc-refuse { animation: qc-wobble .4s ease-in-out; }
@keyframes qc-wobble { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .qc-refuse { animation: none; outline: 2px dashed var(--red); } }
/* phones: each chip shows its pair as two short lines (the lead on top), 44 px targets */
@media (max-width: 900px) {
  .qc-layer { min-height: 44px; padding: 2px 10px 2px 8px; gap: 6px; }
  .qc-layer .bi { display: inline-flex; flex-direction: column; align-items: flex-start; row-gap: 0; }
  .qc-layer .bi > .sep { display: none; }
  .qc-layer .bi > .ur { line-height: 1.5; }
  .qc-layer .bi > .en { font-size: var(--fs-xs); line-height: 1.2; }
  html[data-lead="en"] .qc-layer .bi > .en { font-size: var(--fs-caption); }
  html[data-lead="en"] .qc-layer .bi > .ur { font-size: var(--fs-ur-caption); }
}
/* the translation's status: a pill (draft / reviewed …); on a draft the warning tone */
.qc-tr-badge { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; padding: 2px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--yellow, var(--border)); background: var(--warn-bg, var(--bg-3));
  color: var(--fg); font-size: var(--fs-caption); line-height: 1.5; }
.qc-tr-badge .ur { font-family: var(--font-ur); font-size: var(--fs-ur-caption); }
/* a passage left untranslated (an editors' note, a gap): muted, an italic caption in print */
.qc-gap-row { color: var(--muted); font: italic var(--fs-caption)/1.5 var(--font-en); }
.qc-gap-row .ur { font-style: normal; font-family: var(--font-ur); font-size: var(--fs-ur-caption); }
@media print {
  .qc-layerbar { display: none !important; }
  .qc-tr-badge { border: 1px solid #000; background: none; color: #000; }
  .qc-gap-row { color: #000; }
}
