/* Client Testimonials — tool-specific additions only.
 * Anything reusable belongs in brand.css so the other tools inherit it too.
 *
 * Scoped to .sfui throughout, same as the kit: no theme rule reaches in and no
 * rule of ours leaks out. Two blocks live here — the collection form
 * (.sfui-tmform) and the published grid (.sfui-tmlist). */

/* ---------------- star picker (form) ---------------- */

.sfui .starpick{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:4px 0 2px;}
.sfui .starlab{position:relative;display:inline-flex;flex-direction:column;align-items:center;
  gap:3px;cursor:pointer;padding:4px 3px;border-radius:8px;}
.sfui .starlab input{position:absolute;opacity:0;width:1px;height:1px;margin:0;}
.sfui .starmark{width:34px;height:34px;display:block;
  background-color:var(--input-line);
  -webkit-mask:no-repeat center/100% 100%;mask:no-repeat center/100% 100%;
  -webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L1.6 7.7l5.8-.8z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L1.6 7.7l5.8-.8z'/%3E%3C/svg%3E");
  transition:background-color .12s ease,transform .12s ease;}
.sfui .starcap{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums;}
.sfui .starlab.lit .starmark{background-color:var(--brand-gold);}
.sfui .starpick:hover .starlab .starmark{transform:none;}
.sfui .starlab:hover .starmark{transform:scale(1.08);}
.sfui .starlab input:focus-visible+.starmark{outline:2px solid var(--brand-navy);outline-offset:3px;}
.sfui .starword{margin-left:10px;font-size:13px;font-weight:700;color:var(--brand-navy);}
.sfui .starpick.invalid .starmark{background-color:#e3bdb8;}

/* ---------------- stacked text fields ----------------
 * The kit's .row (label · dotted leader · field) is built for short numeric
 * fields on a worksheet. These are long labels over free-text inputs, so the
 * leader squeezes the label to one word per line. Stack them instead: label
 * over a full-width field, two to a row on desktop. */

.sfui .tmfields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 22px;
  margin-top:4px;}
.sfui .tmrow.span{grid-column:1 / -1;}
.sfui .tmrow.span select{max-width:420px;}
/* Column-flex with a growing label, so a two-line hint in one field does not
 * drop its input below the one beside it. */
.sfui .tmrow{display:flex;flex-direction:column;justify-content:flex-end;
  padding:4px 0;min-width:0;height:100%;}
.sfui .tmrow>.lab{display:block;font-size:14px;margin-bottom:5px;color:var(--ink);
  flex:1 1 auto;}
.sfui .tmrow .hint{display:block;font-size:11.5px;color:var(--muted);font-weight:400;}
.sfui .tmrow>.fld{display:block;}
.sfui .tmrow input[type="text"],
.sfui .tmrow input[type="email"],
.sfui .tmrow input[type="tel"],
.sfui .tmrow select{width:100%;max-width:100%;}
/* brand.css styles input[type=text] and input[type=number] only — email and tel
 * fall through to the browser default and render square and white beside a
 * rounded cream one. Same treatment, applied by hand. */
.sfui .tmrow input[type="email"],
.sfui .tmrow input[type="tel"]{padding:7px 8px;font-family:var(--sans);font-size:13.5px;
  color:var(--ink);text-align:left;border:1px solid var(--input-line);border-radius:6px;
  background:#fffdfa;height:auto;box-shadow:none;margin:0;}
.sfui .tmrow input[type="email"]:focus,
.sfui .tmrow input[type="tel"]:focus{outline:2px solid var(--brand-gold);outline-offset:1px;
  border-color:var(--brand-gold);}
.sfui .tmrow input.invalid{border-color:var(--bad);background:#fdf6f5;}
.sfui .tmrow input.invalid+.hint{color:var(--bad);}

@media (max-width:700px){
  .sfui .tmfields{grid-template-columns:1fr;}
}

/* ---------------- the note itself ---------------- */

.sfui .tmarea{margin:10px 0 4px;}
.sfui .tmarea textarea{width:100%;font-family:var(--sans);font-size:15px;line-height:1.55;
  color:var(--ink);background:#fff;border:1px solid var(--input-line);border-radius:8px;
  padding:11px 13px;resize:vertical;min-height:130px;}
.sfui .tmarea textarea:focus{outline:none;border-color:var(--brand-navy);
  box-shadow:0 0 0 3px rgba(20,32,58,.09);}
.sfui .tmarea textarea.invalid{border-color:var(--bad);background:#fdf6f5;}
.sfui .tmcount{text-align:right;font-size:11px;color:var(--muted);margin-top:4px;
  font-family:var(--mono);font-variant-numeric:tabular-nums;}
.sfui .tmcount.over{color:var(--bad);font-weight:700;}

/* ---------------- consent, honeypot, errors ---------------- */

.sfui .tmconsent{margin-top:14px;padding-top:13px;border-top:1px solid var(--warm-line);}
.sfui .tmconsent label.check{align-items:flex-start;font-size:13px;line-height:1.45;
  color:#4c515c;}
.sfui .tmconsent label.check input{margin-top:2px;flex:0 0 auto;}
.sfui .tmconsent a{color:var(--brand-navy);}
.sfui .tmconsent.invalid label.check{color:var(--bad);}

/* Off-screen rather than display:none — a bot that reads computed styles skips
 * a hidden field, and then the honeypot never catches anything. */
.sfui .tmhp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;}

.sfui .tmerr{background:#f7e9e7;border-left:3px solid var(--bad);color:#7a2a22;font-size:13px;
  padding:10px 13px;border-radius:0 6px 6px 0;margin:14px 0 0;}
.sfui .tmerr[hidden]{display:none;}

.sfui .tmform .actions{margin-top:18px;}
.sfui .btn[disabled]{opacity:.55;cursor:default;}

.sfui .railnote{font-size:13px;color:#4c515c;line-height:1.5;}
.sfui .railnote b{color:var(--brand-gold);}
.sfui ol.tmsteps{margin:0;padding-left:18px;font-size:13px;color:#4c515c;line-height:1.5;}
.sfui ol.tmsteps li{margin-bottom:6px;}

/* ---------------- thank-you + Google nudge ---------------- */

.sfui .tmthanks[hidden]{display:none;}
.sfui .tmnudge{background:var(--card);border:1px solid var(--warm-line);border-radius:10px;
  padding:20px 22px;margin-top:16px;}
.sfui .tmnudge[hidden]{display:none;}
.sfui .tmnudge h3{font-family:var(--serif);font-size:22px;font-weight:700;
  color:var(--brand-navy);margin:0 0 8px;}
.sfui .tmnudge p{font-size:14px;color:#4c515c;margin:0 0 12px;}
.sfui .tmecho{font-size:14px;line-height:1.55;color:var(--ink);background:var(--cream);
  border-left:3px solid var(--brand-gold);padding:12px 14px;border-radius:0 6px 6px 0;
  margin:0 0 14px;white-space:pre-wrap;}
.sfui .tmcopied{font-size:12px;color:var(--good);font-weight:700;margin:10px 0 0;}
.sfui .tmcopied[hidden]{display:none;}

/* ---------------- published grid ---------------- */

.sfui .tmagg{display:flex;align-items:center;gap:9px;margin-top:12px;flex-wrap:wrap;}
.sfui .tmagg-v{font-family:var(--serif);font-size:26px;font-weight:700;color:var(--brand-navy);
  line-height:1;}
.sfui .tmagg-n{font-size:13px;color:var(--muted);}

.sfui .tmstars{display:inline-flex;gap:2px;vertical-align:middle;}
.sfui .tmstars svg{width:16px;height:16px;display:block;}
.sfui .tmstars svg.on{fill:var(--brand-gold);}
.sfui .tmstars svg.off{fill:var(--input-line);}
.sfui .tmstars-n{margin-left:7px;font-family:var(--mono);font-size:12px;color:var(--muted);
  font-variant-numeric:tabular-nums;}

.sfui .tmgrid{display:grid;gap:16px;margin-top:4px;}
.sfui .tmgrid.cols-1{grid-template-columns:1fr;}
.sfui .tmgrid.cols-2{grid-template-columns:repeat(2,1fr);}
.sfui .tmgrid.cols-3{grid-template-columns:repeat(3,1fr);}
.sfui .tmgrid.cols-4{grid-template-columns:repeat(4,1fr);}

.sfui .tmcard{background:var(--card);border:1px solid var(--warm-line);border-radius:10px;
  padding:20px 22px 18px;margin:0;position:relative;display:flex;flex-direction:column;}
.sfui .tmcard.feat{border-color:var(--brand-gold);}
.sfui .tmcard .tmhead{font-family:var(--serif);font-size:19px;font-weight:700;
  color:var(--brand-navy);margin:10px 0 0;line-height:1.25;}
.sfui .tmcard .tmbody{font-size:14.5px;line-height:1.6;color:#3d434f;margin:10px 0 0;
  padding:0;border:0;quotes:none;flex:1 1 auto;}
.sfui .tmcard .tmbody::before{content:"\201C";font-family:var(--serif);font-size:34px;
  color:var(--brand-gold);line-height:0;vertical-align:-8px;margin-right:3px;}
.sfui .tmcard .tmwho{margin-top:14px;padding-top:12px;border-top:1px solid var(--warm-line);}
.sfui .tmcard .tmname{display:block;font-weight:700;font-size:14px;color:var(--brand-navy);}
.sfui .tmcard .tmmeta{display:block;font-size:12px;color:var(--muted);margin-top:2px;}

@media (max-width:900px){
  .sfui .tmgrid.cols-3,.sfui .tmgrid.cols-4{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:640px){
  .sfui .tmgrid.cols-2,.sfui .tmgrid.cols-3,.sfui .tmgrid.cols-4{grid-template-columns:1fr;}
  .sfui .starmark{width:30px;height:30px;}
  .sfui .starword{margin-left:6px;width:100%;}
}

/* ---------------- print ----------------
 * A testimonial page is not a worksheet, but a client occasionally prints the
 * confirmation. Drop the form chrome and keep the words. */
@media print{
  .sfui .rail,.sfui .actions,.sfui .tmhp,.sfui .starcap{display:none !important;}
  .sfui{box-shadow:none;}
  .sfui .tmcard{break-inside:avoid;}
}
