/* =====================================================================
   sam-start.css — the template strip and the guided tour   23-Sep-2026
   Plain rgba() and hex only: the sheet is rasterised by html2canvas,
   which cannot read color-mix() or color(). (See the 22-Sep fix.)
   ===================================================================== */

/* ---------- template strip ---------- */
.sam-start { margin: 0 0 14px; }
.sam-start-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; margin-bottom: 8px;
}
.sam-start-head b { font-weight: 700; }
.sam-start-head .bn { font-style: normal; color: #64748b; font-size: 12px; }
.sam-start-tour {
  margin-left: auto; border: 1px solid #cbd5e1; background: #fff; color: #334155;
  border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer;
}
.sam-start-tour:hover { background: #f1f5f9; border-color: #94a3b8; }

.sam-start-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px;
}
.sam-start-card {
  display: grid; gap: 2px; text-align: left; cursor: pointer;
  padding: 10px 11px; border-radius: 11px;
  border: 1px solid #e2e8f0; background: #fff; font: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sam-start-card:hover { border-color: #a5b4fc; box-shadow: 0 6px 16px -12px rgba(15, 23, 42, .6); transform: translateY(-1px); }
.sam-start-card i { font-style: normal; font-size: 18px; line-height: 1; }
.sam-start-card b { font-size: 13px; font-weight: 650; }
.sam-start-card span { font-size: 11px; color: #64748b; line-height: 1.35; }
.sam-start-card em.bn { font-style: normal; font-size: 11px; color: #94a3b8; }
.sam-start-card.is-on { border-color: #5A33F2; box-shadow: inset 0 0 0 1px #5A33F2; }
.sam-start-note { font-size: 11.5px; color: #64748b; margin: 8px 0 0; }
.sam-start-note.is-said { color: #166534; font-weight: 600; }

/* ---------- guided tour ---------- */
.sam-tour[hidden] { display: none; }
.sam-tour { position: fixed; inset: 0; z-index: 4000; }
.sam-tour-veil { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.sam-tour-ring {
  position: fixed; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 3px #5A33F2, 0 0 0 9999px rgba(15, 23, 42, .55);
  transition: top .22s, left .22s, width .22s, height .22s;
}
.sam-tour-card {
  position: fixed; width: min(330px, calc(100vw - 32px));
  background: #fff; border-radius: 14px; padding: 16px 18px 14px;
  box-shadow: 0 24px 48px -20px rgba(15, 23, 42, .65);
}
.sam-tour-step { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5A33F2; }
.sam-tour-card h4 { margin: 4px 0 6px; font-size: 16px; }
.sam-tour-card p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: #334155; }
.sam-tour-card p.bn { color: #64748b; font-size: 12.5px; }
.sam-tour-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.sam-tour-acts button {
  border-radius: 8px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff; color: #334155;
}
.sam-tour-acts button.is-main { background: #5A33F2; border-color: #5A33F2; color: #fff; font-weight: 600; }
body.sam-touring { overflow: hidden; }

@media (max-width: 720px) {
  .sam-start-cards { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}
/* The tour and the strip are screen furniture — they never belong on the sheet. */
body.exporting .sam-start, body.exporting .sam-tour { display: none !important; }

/* =====================================================================
   Check & cite (sam-qa.js)                                 23-Sep-2026
   ===================================================================== */
.qa-badge { display: grid; gap: 2px; padding: 11px 13px; border-radius: 11px; border: 1px solid #e2e8f0; background: #f8fafc; margin-bottom: 10px; }
.qa-badge b { font-size: 14px; }
.qa-badge span { font-size: 11.5px; color: #64748b; }
.qa-badge.is-gold { border-color: #f5c451; background: #fffbeb; }
.qa-badge.is-ok   { border-color: #86efac; background: #f0fdf4; }
.qa-badge.is-warn { border-color: #fde68a; background: #fffbeb; }
.qa-badge.is-bad  { border-color: #fecaca; background: #fef2f2; }

.qa-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 3px; }
.qa-list li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.qa-list li:hover { background: #f1f5f9; }
.qa-list li i { font-style: normal; font-weight: 700; text-align: center; }
.qa-list li em.bn { display: block; font-style: normal; font-size: 11px; color: #94a3b8; }
.qa-list li b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #5A33F2; border: 1px solid #ddd6fe; border-radius: 6px; padding: 1px 6px; }
.qa-list li.is-ok i   { color: #16a34a; }
.qa-list li.is-warn i { color: #d97706; }
.qa-list li.is-bad i  { color: #dc2626; }

.qa-cite { border-top: 1px solid #e2e8f0; padding-top: 10px; margin-top: 4px; }
.qa-cite-tabs { display: flex; gap: 6px; margin-bottom: 7px; }
.qa-cite-tabs button { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 11.5px; cursor: pointer; }
.qa-cite-tabs button.is-on { border-color: #5A33F2; color: #5A33F2; font-weight: 650; }
.qa-cite-box { width: 100%; font-family: ui-monospace, "Fira Code", monospace; font-size: 11.5px; line-height: 1.5; padding: 9px 10px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; resize: vertical; }
#qaCopy { margin-top: 7px; }

.qa-flash { outline: 2px solid #5A33F2 !important; outline-offset: 2px; border-radius: 6px; }
body.exporting .sam-qa { display: none !important; }

/* =====================================================================
   Version history (sam-account.js)                         23-Sep-2026
   ===================================================================== */
.gma-hist-btn { margin-left: 8px; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 11.5px; cursor: pointer; }
.gma-hist-btn:hover { background: #f1f5f9; }
.gma-hist { border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; padding: 10px 12px; margin: 8px 0; }
.gma-hist[hidden] { display: none; }
.gma-hist-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.gma-hist-head button { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #64748b; }
.gma-hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 230px; overflow: auto; }
.gma-hist-list button { width: 100%; display: grid; gap: 1px; text-align: left; border: 1px solid transparent; background: #f8fafc; border-radius: 8px; padding: 7px 9px; font: inherit; cursor: pointer; }
.gma-hist-list button:hover { border-color: #a5b4fc; background: #fff; }
.gma-hist-list b { font-size: 12.5px; font-weight: 600; }
.gma-hist-list span { font-size: 11px; color: #64748b; }

/* =====================================================================
   Offline drafts (sam-offline.js) and the language switch (sam-lang.js)
   23-Sep-2026
   ===================================================================== */
.sam-net { border-radius: 11px; padding: 10px 12px; margin: 8px 0; font-size: 12.5px; line-height: 1.5; border: 1px solid #e2e8f0; background: #fff; }
.sam-net[hidden] { display: none; }
.sam-net.is-off   { border-color: #fde68a; background: #fffbeb; }
.sam-net.is-on    { border-color: #86efac; background: #f0fdf4; }
.sam-net.is-draft { border-color: #c7d2fe; background: #eef2ff; }
.sam-net .bn { color: #64748b; font-style: normal; }
.sam-net-acts { display: flex; gap: 6px; margin-top: 8px; }
.sam-net-acts button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.sam-net-acts button[data-draft] { background: #5A33F2; border-color: #5A33F2; color: #fff; font-weight: 600; }

.sam-lang { display: inline-flex; gap: 2px; margin-left: auto; padding: 2px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; }
.sam-lang button { border: 0; background: none; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 11.5px; color: #64748b; cursor: pointer; }
.sam-lang button.is-on { background: #0f172a; color: #fff; font-weight: 600; }

/* বাংলা mode: the Bangla line leads, the English stays as a quiet gloss */
body.sam-bn #samPanel .bn { display: block; color: #0f172a; font-size: 12.5px; font-style: normal; font-weight: 600; order: -1; }
body.sam-bn #samPanel .sam-f > span,
body.sam-bn #samPanel .sam-chk > span { display: flex; flex-direction: column; gap: 1px; }
body.sam-bn #samPanel .sam-f > span { font-size: 11.5px; color: #64748b; }
body.sam-bn #samPanel summary { font-size: 13px; }
body.sam-bn #samPanel .sam-note { font-size: 11.5px; }
body.sam-bn #samPanel .sam-note .bn { font-weight: 500; }

/* =====================================================================
   The critic's suggestions (sam-qa.js) and the review ask (sam-review.js)
   23-Sep-2026
   ===================================================================== */
.qa-advice { margin: 10px 0 4px; }
.qa-advice-h { font-size: 12px; font-weight: 700; color: #b45309; margin-bottom: 6px; }
.qa-advice-h .bn { font-style: normal; font-weight: 400; color: #94a3b8; }
.qa-advice-i { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: start;
  padding: 8px 9px; border-radius: 9px; background: #fffbeb; border: 1px solid #fde68a; margin-bottom: 5px; cursor: pointer; font-size: 12.5px; line-height: 1.45; }
.qa-advice-i:hover { border-color: #f59e0b; }
.qa-advice-i i { font-style: normal; }
.qa-advice-i em.bn { display: block; font-style: normal; font-size: 11px; color: #92400e; opacity: .8; }
.qa-advice-i b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #b45309; }
.qa-advice-none { font-size: 12px; color: #16a34a; margin: 0; }
.qa-advice-none .bn { font-style: normal; color: #94a3b8; }

.sam-rev { position: fixed; inset: 0; z-index: 4200; background: rgba(15, 23, 42, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sam-rev-card { position: relative; width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 30px 60px -24px rgba(15, 23, 42, .6); }
.sam-rev-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; }
.sam-rev-card h4 { margin: 0 0 6px; font-size: 17px; }
.sam-rev-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: #475569; }
.sam-rev-card .bn { font-style: normal; color: #94a3b8; }
.sam-rev-stars { display: flex; gap: 4px; margin-bottom: 10px; }
.sam-rev-stars button { border: 0; background: none; font-size: 26px; line-height: 1; color: #e2e8f0; cursor: pointer; padding: 0; }
.sam-rev-stars button.is-on { color: #f59e0b; }
.sam-rev-card textarea, .sam-rev-card input[type="text"] { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 13px; margin-bottom: 8px; resize: vertical; }
.sam-rev-note { font-size: 11.5px !important; color: #94a3b8 !important; }
.sam-rev-note.is-bad { color: #dc2626 !important; font-weight: 600; }
.sam-rev-acts { display: flex; gap: 8px; justify-content: flex-end; }
.sam-rev-acts button { border: 1px solid #cbd5e1; background: #fff; border-radius: 9px; padding: 8px 16px; font: inherit; font-size: 13px; cursor: pointer; }
.sam-rev-acts button.is-main { background: #5A33F2; border-color: #5A33F2; color: #fff; font-weight: 600; }

/* =====================================================================
   Batch export (sam-batch.js)                              23-Sep-2026
   ===================================================================== */
.batch-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 8px 0 6px; }
.batch-head button { margin-left: 0; border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 11.5px; cursor: pointer; }
.batch-head b { margin-right: auto; }
.batch-list { max-height: 210px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px; display: grid; gap: 2px; background: #fff; }
.batch-list label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.batch-list label:hover { background: #f1f5f9; }
.batch-acts { display: flex; gap: 8px; margin-top: 10px; }
.batch-prog { font-size: 12.5px; color: #475569; margin: 8px 0 0; min-height: 18px; }
body.exporting .sam-batch { display: none !important; }
