/**
 * Form field overrides — consistent 1px borders, password toggle, selects.
 */

/* ── Shared field shell ── */
.wp-site-blocks :is(
	input[type='text'],
	input[type='email'],
	input[type='password'],
	input[type='tel'],
	input[type='url'],
	input[type='search'],
	input[type='number'],
	input[type='date'],
	select,
	textarea,
	.dhyan-wc-page .woocommerce form .input-text,
	.dhyan-wc-page .woocommerce form select,
	.dhyan-wc-page .woocommerce form textarea
):not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='submit']):not([type='button']):not(.saue-field__control) {
	box-sizing: border-box !important;
	height: 2.5rem !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0 0.875rem !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.5rem !important;
	background: #fff !important;
	color: #0f172a !important;
	font-size: 0.875rem !important;
	line-height: 1.25rem !important;
	box-shadow: none !important;
	outline: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.wp-site-blocks textarea,
.dhyan-wc-page .woocommerce form textarea {
	height: auto !important;
	min-height: 5.5rem !important;
	padding-top: 0.625rem !important;
	padding-bottom: 0.625rem !important;
	resize: vertical !important;
}

.wp-site-blocks select,
.dhyan-wc-page .woocommerce form select {
	appearance: none !important;
	padding-right: 2.25rem !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 0.75rem center !important;
	background-size: 0.875rem !important;
}

.wp-site-blocks :is(input, select, textarea):focus,
.dhyan-wc-page .woocommerce form :is(input, select, textarea):focus {
	border-color: var(--dhyan-color-primary) !important;
	box-shadow: 0 0 0 3px rgb(var(--dhyan-color-primary-rgb) / 0.12) !important;
}

/* ── Password wrapper ── */
.password-input,
.woocommerce-input-wrapper.password-input,
.dhyan-password-field {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	isolation: isolate;
}

.password-input input,
.dhyan-password-field input,
.woocommerce-input-wrapper.password-input input {
	position: relative !important;
	z-index: 1 !important;
	padding-right: 2.5rem !important;
}

/* Hide misplaced WC toggle buttons outside the wrapper */
.form-row > button.show-password-input,
.woocommerce-form-row > button.show-password-input,
p.form-row > button.show-password-input {
	display: none !important;
}

button.show-password-input,
button.dhyan-password-toggle {
	position: absolute !important;
	right: 0.5rem !important;
	top: 50% !important;
	left: auto !important;
	bottom: auto !important;
	z-index: 5 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 2rem !important;
	height: 2rem !important;
	min-width: 2rem !important;
	min-height: 2rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0.375rem !important;
	background-color: transparent !important;
	pointer-events: auto !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 1.125rem !important;
	box-shadow: none !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	overflow: hidden !important;
	cursor: pointer !important;
	transform: translateY(-50%) !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

button.show-password-input::before,
button.show-password-input::after,
button.dhyan-password-toggle::before,
button.dhyan-password-toggle::after {
	display: none !important;
	content: none !important;
}

button.show-password-input:hover,
button.dhyan-password-toggle:hover {
	background-color: #f8fafc !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z'/%3E%3C/svg%3E") !important;
}

button.show-password-input.is-visible,
button.dhyan-password-toggle.is-visible {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f8f8f' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88'/%3E%3C/svg%3E") !important;
}

.woocommerce-password-strength,
.woocommerce-password-hint,
small.woocommerce-password-hint {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
}

/* WooCommerce buttons must not style password toggles */
.dhyan-wc-page .woocommerce button.show-password-input,
.dhyan-wc-page .woocommerce button.dhyan-password-toggle {
	background-color: transparent !important;
	color: transparent !important;
}

/* Form row layout */
.dhyan-wc-page .woocommerce form .form-row,
.woocommerce-MyAccount-content form .form-row {
	margin-bottom: 0.875rem !important;
}

.dhyan-wc-page .woocommerce form label,
.woocommerce-MyAccount-content form label {
	display: block !important;
	margin-bottom: 0.375rem !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: #0f172a !important;
}

.woocommerce-MyAccount-content fieldset {
	margin-top: 1.25rem !important;
	padding: 1rem 1.25rem !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.75rem !important;
	background: #f8fafc !important;
}

.woocommerce-MyAccount-content fieldset legend {
	padding: 0 0.25rem !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
}

/* Select2 / SelectWoo (country & state) — override WooCommerce .woocommerce-page padding */
.woocommerce-page form .form-row .select2-container,
.dhyan-wc-page .woocommerce form .form-row .select2-container,
.woocommerce-MyAccount-content form .form-row .select2-container,
.select2-container {
	width: 100% !important;
	max-width: 100% !important;
}

.woocommerce-page form .form-row .select2-container .select2-selection--single,
.dhyan-wc-page .woocommerce form .form-row .select2-container .select2-selection--single,
.woocommerce-MyAccount-content form .form-row .select2-container .select2-selection--single,
.select2-container--default .select2-selection--single {
	box-sizing: border-box !important;
	display: flex !important;
	align-items: center !important;
	height: 2.5rem !important;
	min-height: 2.5rem !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.5rem !important;
	background: #fff !important;
	box-shadow: none !important;
}

.woocommerce-page form .form-row .select2-container .select2-selection--single .select2-selection__rendered,
.dhyan-wc-page .woocommerce form .form-row .select2-container .select2-selection--single .select2-selection__rendered,
.woocommerce-MyAccount-content form .form-row .select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered {
	display: block !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	height: 2.5rem !important;
	padding: 0 2rem 0 0.875rem !important;
	line-height: 2.5rem !important;
	font-size: 0.875rem !important;
	color: #0f172a !important;
}

.woocommerce-page form .form-row .select2-container .select2-selection--single .select2-selection__placeholder,
.dhyan-wc-page .woocommerce form .form-row .select2-container .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection__placeholder {
	color: #94a3b8 !important;
	line-height: 2.5rem !important;
}

.woocommerce-page form .form-row .select2-container .select2-selection--single .select2-selection__arrow,
.dhyan-wc-page .woocommerce form .form-row .select2-container .select2-selection--single .select2-selection__arrow,
.woocommerce-MyAccount-content form .form-row .select2-container .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow {
	position: absolute !important;
	top: 0 !important;
	right: 0.5rem !important;
	height: 2.5rem !important;
	width: 1.25rem !important;
}

.woocommerce-page form .form-row .select2-container .select2-selection--single .select2-selection__arrow b,
.select2-container--default .select2-selection--single .select2-selection__arrow b {
	display: none !important;
}

.woocommerce-page form .form-row .select2-container.select2-container--focus .select2-selection--single,
.woocommerce-page form .form-row .select2-container.select2-container--open .select2-selection--single,
.dhyan-wc-page .woocommerce form .form-row .select2-container.select2-container--focus .select2-selection--single,
.dhyan-wc-page .woocommerce form .form-row .select2-container.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--dhyan-color-primary) !important;
	box-shadow: 0 0 0 3px rgb(var(--dhyan-color-primary-rgb) / 0.12) !important;
}

.select2-dropdown {
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.5rem !important;
	box-shadow: 0 8px 24px -12px rgb(15 23 42 / 0.18) !important;
	overflow: hidden !important;
}

.select2-results__option {
	padding: 0.5rem 0.875rem !important;
	font-size: 0.875rem !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background: var(--dhyan-color-primary-soft) !important;
	color: #0f172a !important;
}

/* ── Product quantity stepper (single product) ── */
.dhyan-wc-product-page .wp-block-add-to-cart-form .quantity,
.dhyan-wc-product-page form.cart .quantity,
.dhyan-wc-product-page .wp-block-add-to-cart-form .wc-block-components-quantity-selector,
.dhyan-wc-product-page form.cart .wc-block-components-quantity-selector {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	align-self: flex-start !important;
	width: auto !important;
	max-width: none !important;
}

.dhyan-wc-product-page .quantity.dhyan-qty-stepper,
.dhyan-wc-product-page .dhyan-qty-stepper {
	display: inline-flex !important;
	align-items: stretch !important;
	width: auto !important;
	max-width: none !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.5rem !important;
	background: #fff !important;
	overflow: hidden !important;
	box-shadow: none !important;
}

.dhyan-wc-product-page .dhyan-qty-stepper .dhyan-qty-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 2.5rem !important;
	width: 2.5rem !important;
	min-width: 2.5rem !important;
	height: 2.5rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #64748b !important;
	font-size: 1.125rem !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	box-shadow: none !important;
	cursor: pointer !important;
	transition: background-color 0.15s ease, color 0.15s ease !important;
}

.dhyan-wc-product-page .dhyan-qty-stepper .dhyan-qty-btn:hover {
	background: #f8fafc !important;
	color: var(--dhyan-color-primary) !important;
}

.dhyan-wc-product-page .dhyan-qty-stepper input.qty,
.dhyan-wc-product-page .dhyan-qty-stepper input[type='number'] {
	flex: 0 0 3rem !important;
	width: 3rem !important;
	min-width: 3rem !important;
	height: 2.5rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 1px solid #e2e8f0 !important;
	border-right: 1px solid #e2e8f0 !important;
	border-radius: 0 !important;
	background: #fff !important;
	text-align: center !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	color: #0f172a !important;
	box-shadow: none !important;
	-moz-appearance: textfield !important;
}

.dhyan-wc-product-page .dhyan-qty-stepper input.qty:focus,
.dhyan-wc-product-page .dhyan-qty-stepper input[type='number']:focus {
	outline: none !important;
	box-shadow: inset 0 0 0 2px rgb(var(--dhyan-color-primary-rgb) / 0.15) !important;
}

.dhyan-wc-product-page .dhyan-qty-stepper input.qty::-webkit-outer-spin-button,
.dhyan-wc-product-page .dhyan-qty-stepper input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.dhyan-wc-product-page .wc-block-components-quantity-selector {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	align-items: stretch !important;
	width: auto !important;
	max-width: none !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.5rem !important;
	background: #fff !important;
	overflow: hidden !important;
}

.dhyan-wc-product-page .wc-block-components-quantity-selector__button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 2.5rem !important;
	min-width: 2.5rem !important;
	height: 2.5rem !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #64748b !important;
}

.dhyan-wc-product-page .wc-block-components-quantity-selector__button:hover {
	background: #f8fafc !important;
	color: var(--dhyan-color-primary) !important;
}

.dhyan-wc-product-page .wc-block-components-quantity-selector__input {
	width: 3rem !important;
	min-width: 3rem !important;
	height: 2.5rem !important;
	border: 0 !important;
	border-left: 1px solid #e2e8f0 !important;
	border-right: 1px solid #e2e8f0 !important;
	border-radius: 0 !important;
	text-align: center !important;
	font-weight: 600 !important;
	box-shadow: none !important;
}
