/* Проект: ZVUMO — общие стили полей ввода (не RUNXIN). Правило 1.6 «Поля ввода» (решение владельца 23.10.2026):
   никаких серых полей браузера по умолчанию. Один файл на все страницы my.zvumo.ru, demo, лендингов и главной.
   Работает по тегам, без классов. Специфичность нулевая (:where), поэтому свои красивые поля модулей
   (.jform, .tg-input, .bk-field, .ad-search и т. п.) остаются как были — они всегда сильнее.
   Подключение: <link rel="stylesheet" href="/zv-forms.css"> после общих стилей страницы. Копии: zvumo-landings/kit, zvumo-home/assets. */

:where(body) :where(
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not([type=hidden]),
  select,
  textarea
) {
  box-sizing: border-box;
  width: auto; max-width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2, rgba(170, 178, 255, .22));
  background-color: var(--zv-field-bg, #0B0C26);   /* тёмно-синий, как фон страницы (решение владельца 23.10): на карточке на тон темнее, серого нет */
  color: var(--text, #EEF0FF);
  font: inherit;
  font-size: 15px;
  line-height: 1.25;
  outline: none;
  -webkit-appearance: none; appearance: none;
  accent-color: #7C5CFF;
  caret-color: #C9CCEB;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
:where(body) :where(textarea) { height: auto; min-height: 96px; padding: 11px 14px; line-height: 1.45; resize: vertical; }
:where(body) :where(select) {
  padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%23A3A8D0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 16px;
}
:where(body) :where(select[multiple], select[size]) { height: auto; padding: 8px; background-image: none; }
:where(body) :where(select) option, :where(body) :where(select) optgroup { color: #EEF0FF; background: #0B0C26; }

/* подсказка в пустом поле */
:where(body) :where(input, textarea)::placeholder { color: var(--dim, #6F74A3); opacity: 1; }

/* наведение и фокус: свечение фиолетово-розовое, как у кнопок */
:where(body) :where(input, select, textarea):hover:not(:disabled):not(:focus) { border-color: rgba(170, 178, 255, .38); }
:where(body) :where(input, select, textarea):focus-visible,
:where(body) :where(input, select, textarea):focus {
  border-color: #9A7BFF;
  background-color: #12143A;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .28), 0 0 26px -6px rgba(224, 64, 251, .55);
}

/* выключено и ошибка */
:where(body) :where(input, select, textarea):disabled,
:where(body) :where(input, select, textarea)[readonly][aria-disabled=true] { opacity: .5; cursor: not-allowed; background-color: #0B0C26; }
:where(body) :where(input, select, textarea):is([aria-invalid=true], .is-error, .error, .invalid),
:where(body) :where(input, select, textarea):user-invalid {
  border-color: #FF4D7E;
  box-shadow: 0 0 0 3px rgba(255, 77, 126, .22);
}

/* числа без стрелок браузера */
:where(body) :where(input[type=number])::-webkit-inner-spin-button,
:where(body) :where(input[type=number])::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
:where(body) :where(input[type=number]) { -moz-appearance: textfield; appearance: textfield; }

/* дата, время, поиск: значки браузера в тёмной теме */
:where(body) :where(input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=week])::-webkit-calendar-picker-indicator { filter: invert(.75) sepia(.3) saturate(3) hue-rotate(220deg); cursor: pointer; opacity: .85; }
:where(body) :where(input[type=search])::-webkit-search-cancel-button { -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 3l8 8M11 3l-8 8' stroke='%23A3A8D0' stroke-width='1.8' stroke-linecap='round'/></svg>") center/contain no-repeat; }

/* автозаполнение браузера: не красим поле в жёлтый/белый */
:where(body) :where(input, select, textarea):-webkit-autofill,
:where(body) :where(input, select, textarea):-webkit-autofill:hover,
:where(body) :where(input, select, textarea):-webkit-autofill:focus {
  -webkit-text-fill-color: #EEF0FF;
  -webkit-box-shadow: 0 0 0 1000px #12143A inset;
  box-shadow: 0 0 0 1000px #12143A inset;
  caret-color: #C9CCEB;
  transition: background-color 99999s ease-out 0s;
}
:where(body) :where(input, select, textarea):autofill { -webkit-text-fill-color: #EEF0FF; box-shadow: 0 0 0 1000px #12143A inset; }

/* флажки и переключатели: фирменный цвет и удобный размер */
:where(body) :where(input[type=checkbox], input[type=radio]) { width: 18px; height: 18px; margin: 0; accent-color: #7C5CFF; cursor: pointer; vertical-align: middle; }
:where(body) :where(input[type=checkbox], input[type=radio]):focus-visible { outline: 2px solid rgba(124, 92, 255, .7); outline-offset: 2px; border-radius: 5px; }
:where(body) :where(input[type=radio]):focus-visible { border-radius: 50%; }
:where(body) :where(input[type=range]) { accent-color: #7C5CFF; }
:where(body) :where(input[type=file]) { color: var(--soft, #C9CCEB); font: inherit; font-size: 14px; }
:where(body) :where(input[type=file])::file-selector-button { margin-right: 10px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2, rgba(170, 178, 255, .22)); border-radius: 10px; background: rgba(255, 255, 255, .06); color: var(--text, #EEF0FF); font: inherit; font-size: 14px; cursor: pointer; }

/* подпись над полем: когда label обёрнут вокруг поля, поле идёт с новой строки на всю ширину */
:where(body) :where(label) > :where(input:not([type=checkbox]):not([type=radio]), select, textarea) { display: block; width: 100%; max-width: 420px; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { :where(body) :where(input, select, textarea) { transition: none; } }
