/* ==========================================================================
   Поля форм — ОДИН вигляд на весь сайт (токени --theme-field-* у tokens.css).
   Еталон — поля попапу входу ([account_login]).

   Де діє: усі форми WooCommerce (оформлення, кабінет: вхід, відновлення / новий пароль,
   профіль, адреси) — обгортка .woocommerce; форми Elementor (.elementor-form);
   будь-який контейнер із класом theme-form; окремі <select class="theme-select">.
   Не чіпає: пошук у шапці, поля вікна «Вказати адресу» (мають свій, такий самий, вигляд),
   поле промокоду (висота = кнопка поруч), кількість товару (.qty), чекбокси й радіо.

   !important — інакше перемагають поля Kit Elementor (.elementor-kit-N input…: прозора рамка,
   радіус 0, а у фокусі — 10px) і reset теми Hello (обведення у фокусі).
   ========================================================================== */

body :is(.woocommerce, .woocommerce-page, .theme-form) :is(
	input.input-text,
	input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
	input[type="number"], input[type="search"], input[type="url"], input[type="date"], input[type="time"],
	textarea, select
):not(.qty):not(.theme-co-coupon__input):not(.theme-stepper__value):not(.e-search-input):not([type="hidden"]),
body .elementor-form .elementor-field-textual,
body select.theme-select{
	box-sizing:border-box !important;
	width:100%;max-width:100%;
	min-height:var(--theme-field-h) !important;
	margin:0;
	padding:0 var(--theme-field-pad-x) !important;
	border:1px solid var(--theme-field-border) !important;
	border-radius:var(--theme-field-radius) !important;
	background-color:var(--theme-field-bg) !important;
	color:var(--theme-text) !important;
	font-family:var(--theme-font), sans-serif !important;
	font-size:16px !important;           /* ≥16px — iOS не збільшує сторінку при фокусі */
	font-weight:400 !important;
	line-height:1.3 !important;
	letter-spacing:0 !important;
	box-shadow:none !important;
	outline:none !important;
	transition:border-color .15s ease;
}

/* багаторядкове поле (:is(x, x.input-text) — та сама вага, що в загального правила вище, тож перемагає наступне) */
body :is(.woocommerce, .woocommerce-page, .theme-form) :is(textarea, textarea.input-text):not(.qty):not(.theme-co-coupon__input):not(.theme-stepper__value):not(.e-search-input):not([type="hidden"]),
body .elementor-form textarea.elementor-field-textual{
	min-height:110px !important;padding:14px var(--theme-field-pad-x) !important;resize:vertical;
}

/* випадаючий список — своя стрілка (шеврон сайту) */
body :is(.woocommerce, .woocommerce-page, .theme-form) :is(select, select.input-text):not(.qty):not(.theme-co-coupon__input):not(.theme-stepper__value):not(.e-search-input):not([type="hidden"]),
body .elementor-form select.elementor-field-textual,
body select.theme-select{
	-webkit-appearance:none !important;appearance:none !important;
	padding-right:44px !important;cursor:pointer;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1A1B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 6 7-6'/%3E%3C/svg%3E") !important;
	background-repeat:no-repeat !important;background-position:right 14px center !important;background-size:20px 20px !important;
}

/* наведення — без зміни рамки; фокус — лише темна рамка, без обведення браузера / теми */
body :is(.woocommerce, .woocommerce-page, .theme-form) :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not(.qty):not(.theme-co-coupon__input):not(.theme-stepper__value):hover,
body .elementor-form .elementor-field-textual:hover{border-color:var(--theme-field-border) !important}
body :is(.woocommerce, .woocommerce-page, .theme-form) :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not(.qty):not(.theme-stepper__value):is(:focus, :focus-visible),
body .elementor-form .elementor-field-textual:is(:focus, :focus-visible),
body select.theme-select:is(:focus, :focus-visible){
	border-color:var(--theme-field-focus) !important;
	border-radius:var(--theme-field-radius) !important; /* Kit у фокусі міняє радіус */
	outline:none !important;box-shadow:none !important;
	background-color:var(--theme-field-bg) !important;color:var(--theme-text) !important;
}

body :is(.woocommerce, .woocommerce-page, .theme-form) :is(input, textarea)::placeholder,
body .elementor-form .elementor-field-textual::placeholder{color:var(--theme-text-muted) !important;opacity:1}

/* неактивне поле (напр. «Дата / Час», поки не відмічено «На певний час») */
body :is(.woocommerce, .woocommerce-page, .theme-form) :is(input, textarea, select):disabled,
body select.theme-select:disabled{
	background-color:var(--theme-surface-alt) !important;color:var(--theme-text-muted) !important;cursor:not-allowed;opacity:1;
}

/* помилка */
body .woocommerce .form-row.woocommerce-invalid :is(input.input-text, select, textarea){border-color:var(--theme-error) !important}

/* підписи над полями — як у попапі входу (оформлення ховає свої — CHECKOUT_LABELS) */
body .woocommerce form .form-row:not(:has(input[type="checkbox"])) > label{
	display:block;margin:0 0 6px;
	color:var(--theme-text-muted);font-family:var(--theme-font), sans-serif;font-size:13px;font-weight:400;line-height:1.2;
}
body .woocommerce form .form-row label .required{color:inherit;text-decoration:none}

/* чекбокси й радіо — колір сайту */
body :is(.woocommerce, .woocommerce-page, .theme-form) :is(input[type="checkbox"], input[type="radio"]){accent-color:var(--theme-text-strong)}

/* ---------- форми кабінету: відновлення / новий пароль, профіль, адреси — поля на всю ширину ---------- */
body .woocommerce :is(form.woocommerce-ResetPassword, form.lost_reset_password, form.woocommerce-EditAccountForm, form.edit-account) .form-row{
	float:none;width:100%;margin:0 0 16px;padding:0;
}
body .woocommerce form.lost_reset_password > p:first-child{margin:0 0 16px;color:var(--theme-text);line-height:1.45}
body .woocommerce :is(form.woocommerce-ResetPassword, form.lost_reset_password){max-width:480px}

/* ---------- повідомлення WooCommerce (кабінет, вхід, відновлення пароля) — як на оформленні ---------- */
body .woocommerce :is(.woocommerce-error, .woocommerce-info, .woocommerce-message){
	margin:0 0 16px;padding:14px 16px;
	border:0;border-radius:var(--theme-field-radius);
	background:var(--theme-accent-soft);color:var(--theme-text);
	font-family:var(--theme-font), sans-serif;font-size:15px;line-height:1.4;list-style:none;
}
body .woocommerce .woocommerce-error{box-shadow:inset 3px 0 0 var(--theme-error)}
body .woocommerce :is(.woocommerce-error, .woocommerce-info, .woocommerce-message)::before{content:none}
body .woocommerce .woocommerce-error li{margin:0;padding:0}
body .woocommerce .woocommerce-error li + li{margin-top:6px}
