/* Client greetings (client-greetings-ui.js) and follow-up sequences (drip-ui.js). Uses the CRM's own colour tokens, so light and dark both follow the theme. */

/* ---- the Date of birth field ---- */
.dob-w { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.dob-w .ap-btn { flex: 1 1 150px; width: auto; min-width: 0; }
.dob-w .dob-year { flex: 0 1 130px; min-width: 96px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); font: inherit; }
.dob-w .dob-year:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,161,91,.22); outline: none; }
.dob-w .dob-year:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.dob-w.dob-bad .ap-btn, .dob-w.dob-bad .dob-year { border-color: var(--red); }
.dob-err { color: var(--red); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.dob-help { color: var(--muted); font-size: 12px; margin-top: 5px; }

/* ---- the Client wishes section and the message wording cards ---- */
.cg-section { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.cg-state, .dr-state { font-size: 13px; color: var(--text); line-height: 1.5; }
.cg-tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.cg-tpl { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); min-width: 0; }
.cg-tpl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cg-tpl-head b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.cg-tpl-body { font-size: 13.5px; line-height: 1.55; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.cg-tpl-vars { margin: 10px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--muted); }
.cg-tpl-vars li { margin: 3px 0; }
.cg-tpl-vars code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; color: var(--ink); }

/* ---- the Follow-up sequences page ---- */
.dr-h { margin: 18px 0 8px; font-size: 14px; color: var(--ink); }
.dr-steps td { vertical-align: middle; }
.dr-steps input[type="text"], .dr-steps select, .dr-steps input.dr-day { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); font: inherit; max-width: 100%; }
.dr-steps input.dr-day { width: 72px; font-weight: 700; }
.dr-steps input[type="text"] { width: 100%; min-width: 150px; }
.dr-steps tr.dr-off td:not(:nth-child(4)):not(:last-child) { opacity: .55; }
.dr-mini { margin: 0; }
.dr-aud { display: flex; flex-direction: column; gap: 10px; }
.dr-sources { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.dr-sources[hidden] { display: none; }
.dr-active { margin-left: auto; }
.dr-test select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); font: inherit; max-width: 100%; }
.dr-time-form .ap-field input[type="text"], .dr-time-form .ap-field select { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); font: inherit; max-width: 100%; }
.dr-time-form .ap-field input[type="text"] { width: 200px; }
.dr-tiles, .cg-tiles { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the small chip on a lead ---- */
.dr-chipwrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; font-size: 12.5px; }
.dr-chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-weight: 700; font-size: 12px; background: var(--inkc-bg, var(--surface-2)); color: var(--inkc, var(--ink)); border: 1px solid var(--line); white-space: nowrap; }
.dr-chip.warn { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.dr-chip.good { background: var(--green-bg); color: var(--green); border-color: transparent; }
.dr-chip-note { color: var(--muted); }
.dr-chip-ask { color: var(--text); }
.dr-chip-ask[hidden] { display: none; }

@media (max-width: 640px) {
  .dr-steps input[type="text"] { min-width: 0; }
  .dr-active { margin-left: 0; }
  .dr-time-form .ap-field input[type="text"] { width: 100%; }
  .dob-w .dob-year { flex: 1 1 100%; }
}
