/* ==========================================================================
   Labour Life practice system: sms.css. Owner: sms (M7).
   The Send SMS dialog on a task and Admin > SMS (SPEC 7.5.6, 7.5.10).
   Every class here starts with sms-. Tokens only, no raw colours. Phone first.

     .sms-dialog                  the body of the Send SMS dialog
     .sms-to (__o __t __num)      who the SMS goes to: radio rows, then the typed number
     .sms-count (--err, __u)      "152 characters, 1 SMS" under the message
     .sms-admin (__switch __foot) the settings page
     .sms-bal (__n)               the credit balance
     .sms-hook (__u)              the delivery report address with its Copy button
     .sms-steps                   the numbered steps for the SMSPortal account
     .sms-hint .sms-blanks        the plain lines under a message box (12 Nov 2026)
     .sms-tpl (__box __list __row __main __name __text __meta __acts __switch)
                                  the Templates card of Admin > SMS and its window (decision 479)
   ========================================================================== */

/* ---------- the dialog ---------- */

.sms-dialog > .note { margin-bottom: var(--s4); }

/* Radio rows. The whole row is the touch target. */
.sms-to { gap: 0; border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.sms-to > legend { padding: 0; margin-bottom: var(--s1); }
.sms-to__o {
  display: flex; align-items: flex-start; gap: var(--s3);
  min-height: var(--tap); padding: var(--s2) 0; cursor: pointer;
}
.sms-to__o input {
  flex: none; width: 22px; height: 22px; margin: 1px 0 0;
  accent-color: var(--ink);
}
.sms-to__t { min-width: 0; overflow-wrap: anywhere; }
.sms-to__num { margin: 0 0 0 calc(22px + var(--s3)); }
.sms-to__num[hidden] { display: none; }

.sms-count {
  margin-top: calc(var(--s2) * -1);
  font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.sms-count--err { color: var(--danger-ink); font-weight: 600; }
.sms-count__u { margin-top: var(--s1); }

/* ---------- Admin > SMS ---------- */

.sms-admin__switch { margin-bottom: var(--s4); }
.sms-admin__foot { margin-top: var(--s3); }

.sms-bal { margin-bottom: var(--s3); }
.sms-bal__n { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-tight); }

.sms-hook { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.sms-hook__u { min-width: 0; font-family: var(--font-mono); font-size: var(--fs-sm); }
@media (min-width: 560px) {
  .sms-hook { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

.sms-steps {
  display: grid; gap: var(--s2);
  margin: 0 0 var(--s4); padding-left: var(--s5);
  list-style: decimal; color: var(--ink-soft);
}
.sms-steps li { padding-left: var(--s1); }

/* ---------- SMS templates (12 Nov 2026, decision 479) ---------- */

/* The plain lines under a message box: the blanks reminder, a credit per part, what {name} becomes. */
.sms-hint, .sms-blanks { margin-top: var(--s1); }
.sms-blanks[hidden] { display: none; }

/* Admin > SMS, the Templates card: one template a row. The buttons go under the text on a phone. */
.sms-tpl__box { margin-bottom: var(--s3); min-width: 0; }
.sms-tpl__list { margin: 0; padding: 0; list-style: none; }
.sms-tpl__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  padding: var(--s3) 0; border-top: 1px solid var(--line);
}
.sms-tpl__row:first-child { border-top: 0; padding-top: 0; }
.sms-tpl__main { display: grid; gap: var(--s1); flex: 1 1 14rem; min-width: 0; justify-items: start; }
.sms-tpl__name { font-weight: 600; overflow-wrap: anywhere; }
.sms-tpl__row.is-off .sms-tpl__name { color: var(--ink-mute); }
.sms-tpl__text { font-size: var(--fs-sm); color: var(--ink-soft); overflow-wrap: anywhere; }
.sms-tpl__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.sms-tpl__acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.sms-tpl__switch { margin-top: var(--s4); }
