/* Add / Edit lead dialog (js/leadFormUi.js, Sami 2026-11-07, made plainer 2026-11-08): plain fields in a fixed order, icons in the
   inputs, a locked Mobile 1 the size of a field, and a footer that says what changed. */
dialog.lf { width: min(560px, 94vw); }
dialog.lf.wide { width: min(860px, 96vw); }
dialog.lf .modal-head { padding: 22px 28px 8px; }
dialog.lf .modal-head h2 { font-size: var(--fs-title); }
dialog.lf .modal-body { padding: 10px 28px 20px; }
dialog.lf .form-grid { gap: 14px 16px; }

/* Inputs with an icon */
.lf-in { position: relative; }
.lf-in input { padding-inline-start: 38px; }
.lf-ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); display: grid; color: var(--c-faint); pointer-events: none; transition: color .15s; }
.lf-in:focus-within .lf-ic { color: var(--c-ink); }
dialog.lf .field :is(input, select, textarea) { transition: border-color .15s, box-shadow .15s; }
dialog.lf .field :is(input, select, textarea):focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px var(--c-select); }
dialog.lf .field input[aria-invalid="true"] { border-color: var(--c-danger); }
.lf-err { color: var(--c-danger); }

/* A mobile = country box + number box (js/phoneInput.js, OPEN-QUESTIONS #298); used by every form that takes a mobile */
/* One field, two parts (Sami 2026-11-09): one border around both, a thin line between the country and the number, one focus ring */
.ph2 { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-card); transition: border-color .15s, box-shadow .15s; }
.ph2:focus-within { border-color: var(--c-ink); box-shadow: 0 0 0 3px var(--c-select); }
.ph2:has([aria-invalid="true"]) { border-color: var(--c-danger); }
.field small.ph2-err { color: var(--c-danger); }
.ph2-cc { flex: 0 0 104px; min-width: 0; border-inline-end: 1px solid var(--c-line); }
.field .ph2.ph2 :is(input, input:focus) { border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; }
.ph2-cc .combo-input { padding-inline-end: 26px; font-weight: var(--fw-medium); cursor: pointer; }
.ph2-cc .combo-input:not(:focus):hover { background: var(--c-select); } /* hover (said-once #4, 2026-11-14) */
.ph2-cc.combo::after { content: ""; position: absolute; inset-inline-end: 11px; top: 50%; width: 6px; height: 6px; border-inline-end: 1.5px solid var(--c-faint); border-bottom: 1.5px solid var(--c-faint); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.ph2 > input[type="tel"] { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
/* The locked Mobile 1: the same one field, grey, lock in the country part, Copy at the end */
.lf-locked .ph2 { border-color: var(--c-line); background: var(--c-tile); }
.lf-locked .ph2:focus-within { border-color: var(--c-line); box-shadow: none; }
.ph2 > .lf-lockrow { border: 0; border-radius: 0; background: transparent; }
.ph2 > .lf-lockrow.ph2-cc { border-inline-end: 1px solid var(--c-line); }
.ph2 > .lf-lockrow:not(.ph2-cc) { flex: 1; min-width: 0; }
.ph2 .lf-lockrow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph2-cc.lf-lockrow b { font-variant-numeric: normal; font-weight: var(--fw-medium); }

/* Locked Mobile 1: the same size as a field, grey, a lock where the phone icon would be, a Copy icon at the end */
.lf-lockrow { display: flex; align-items: center; gap: 10px; min-height: 40px; padding-block: 4px; padding-inline: 12px 4px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-tile); }
.lf-lockic { flex: none; display: grid; color: var(--c-faint); cursor: help; }
.lf-lockrow b { flex: 1; min-width: 0; font-size: var(--fs-body); font-weight: 400; font-variant-numeric: tabular-nums; color: var(--c-text); }
.lf-copy { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); background: var(--c-card); color: var(--c-text); cursor: pointer; }
.lf-copy:hover { background: var(--c-select); }
.lf-copy:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Footer note */
.lf-foot-note { margin-inline-end: auto; align-self: center; font-size: var(--fs-hint); color: var(--c-faint); transition: color .15s; }
.lf-foot-note.on { color: var(--c-ink); }
dialog.lf .modal-foot .btn.primary:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 560px) {
  dialog.lf .modal-head, dialog.lf .modal-body { padding-inline: 18px; }
}
