/* ============================================================================
   kit-forms.css — настоящие поля ввода в рамках кита (краткая анкета Applicants/Register и анкета ЛК
   Applicants/Profile). В ките .input / .textarea / .check нарисованы как div; здесь — те же размеры
   и состояния (.is-err, фокус = .is-focus кита) для <input>, <textarea> и чекбокса, плюс поле даты
   с кнопкой календаря. kit.css не правим. Префикс kf-.
   ============================================================================ */

/* ---------- однострочное поле: рамка .input кита, внутри настоящий <input> ---------- */
.kf-input { height: 48px; font-size: 15px; }
.kf-input:focus-within { border-color: #262626; box-shadow: 0 0 0 3px rgba(38,38,38,.08); }
.kf-input.is-err:focus-within { border-color: #e82d37; box-shadow: 0 0 0 3px rgba(232,45,55,.08); }
.kf-input input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: #121212; letter-spacing: 0;
}
.kf-input input::placeholder { color: #9a9a9a; opacity: 1; }
.kit-body .kf-input input:focus-visible { outline: none; }

/* ---------- многострочное поле: класс .textarea кита на самом <textarea> ---------- */
textarea.textarea {
  font: inherit; font-size: 15px; line-height: 1.5; color: #121212; resize: vertical; outline: 0;
  white-space: pre-wrap; margin: 0;
}
textarea.textarea::placeholder { color: #9a9a9a; opacity: 1; }
textarea.textarea:focus { border-color: #262626; box-shadow: 0 0 0 3px rgba(38,38,38,.08); }
textarea.textarea.is-err:focus { border-color: #e82d37; box-shadow: 0 0 0 3px rgba(232,45,55,.08); }
.kit-body textarea.textarea:focus-visible { outline: none; }

/* ---------- заблокированное поле телефона (.input.is-locked кита) ---------- */
.kf-locked svg.ic { width: 18px; height: 18px; }
.kf-locked-value { font-weight: 500; white-space: nowrap; flex: 0 0 auto; }
/* номер не обрезается; при нехватке места сжимается пилюля «Подтверждён» */
.kf-locked .pill { margin-left: auto; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.kf-locked .pill svg.ic { width: 14px; height: 14px; stroke-width: 2; color: #00a53d; }

/* ---------- подпись поля + ссылка справа («Контактный телефон … Изменить номер») ---------- */
.kf-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kf-link { font-size: 13px; cursor: pointer; background: none; border: 0; padding: 0; }
.kf-link svg.ic { width: 14px; height: 14px; }

/* ---------- дата: текст ДД.ММ.ГГГГ + кнопка календаря (нативный <input type=date> поверх кнопки) ---------- */
.kf-date { padding-right: 4px; }
.kf-cal { position: relative; display: inline-flex; flex: none; }
.kf-cal-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 10px; color: #646464; cursor: pointer;
}
.kf-cal-btn:hover { background: #f4f4f4; color: #121212; }
.kf-cal-btn svg.ic { width: 20px; height: 20px; }
/* Нативный выбор даты: прозрачный, точно поверх кнопки. На мыши открывается через showPicker() по кнопке;
   на сенсорных экранах касание попадает прямо в нативное поле — так календарь открывается и там, где
   showPicker() нет (старые Android WebView) или он запрещён (скрытое поле в Safari). */
.kf-cal-native {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  opacity: 0; pointer-events: none; font-size: 16px; background: transparent; color: transparent;
}
.kf-cal-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
@media (pointer: coarse) {
  .kf-cal-native { pointer-events: auto; }
}

/* ---------- чекбокс .check кита на настоящем <input type=checkbox> ---------- */
.kf-check { position: relative; cursor: pointer; }
.kf-check-input { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: 0; opacity: 0; cursor: pointer; }
.kf-check i { display: inline-flex; align-items: center; justify-content: center; color: #ffffff; transition: background-color .2s, border-color .2s; }
.kf-check i svg.ic { width: 12px; height: 12px; stroke-width: 2.4; opacity: 0; }
.kf-check-input:checked + i { background: #ff760d; border-color: #ff760d; }
.kf-check-input:checked + i svg.ic { opacity: 1; }
.kf-check-input:focus-visible + i { outline: 2px solid #ff760d; outline-offset: 2px; }
.kf-check-input[aria-invalid="true"] + i { border-color: #e82d37; }
/* ссылка внутри текста согласия — подчёркнута всегда (Registration.dc.html; так же ссылка согласия на alliance-altyn.kg),
   чтобы отличаться от текста не только цветом; при наведении цвет не меняется (без оранжевого) */
.kf-check a { color: #121212; text-decoration: underline; text-underline-offset: 3px; }
.kf-check a:hover { color: #121212; }

/* ---------- ошибки и подсказки (.err / .hint кита) ---------- */
.err[hidden], .hint[hidden], .notice[hidden] { display: none; }
.kf-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: default; pointer-events: none; }

/* мобильная раскладка: зоны нажатия ≥44px (ТЗ, KIT-LK) */
@media (max-width: 480px) {
  .kf-date { padding-right: 1px; }
  .kf-cal-btn { width: 44px; height: 44px; border-radius: 11px; }
  .kf-link { min-height: 44px; font-size: 14px; display: inline-flex; align-items: center; }
  .kf-link svg.ic { width: 16px; height: 16px; }
}
