/**
 * KASA FIK — IČO field styling.
 */

/* ---------------------------------------------------------------- field row */

/*
 * The IČO input and its lookup button share one flex line, button on the right.
 * Only the IČO row is affected; every other billing field keeps the theme's
 * full-width block layout.
 */
.woocommerce-checkout .kasafik-ico-field .woocommerce-input-wrapper,
.woocommerce-checkout .kasafik-ico-field > .woocommerce-input-wrapper {
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex-wrap: wrap;
}

.woocommerce-checkout .kasafik-ico-field .kasafik-ico-input {
	flex: 1 1 12em;
	min-width: 0;
	max-width: 22em;
	height: 3em;
}

.woocommerce-checkout .kasafik-ico-field .kasafik-ico-lookup {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	margin: 0;
}

.woocommerce-checkout .kasafik-ico-field .kasafik-ico-lookup__button {
	height: 3em;
	margin: 0;
	white-space: nowrap;
}

/* Status line sits below the row, never inside the flex line. */
.woocommerce-checkout .kasafik-ico-field .kasafik-ico-lookup__status {
	flex: 1 0 100%;
	margin: 0.35em 0 0;
	font-size: 0.9em;
	color: #1a7f37;
}

.woocommerce-checkout .kasafik-ico-field .kasafik-ico-lookup__status.is-error {
	color: #b32d2e;
}

/* Outside checkout (My Account address) fall back to the plain block layout. */
.kasafik-ico-field input {
	letter-spacing: 0.05em;
}

.kasafik-ico-lookup__button[disabled] {
	opacity: 0.6;
	cursor: progress;
}

/* ------------------------------------------------------- progressive reveal */

/*
 * Until an IČO is typed, the remaining billing fields are collapsed so the
 * customer is steered to the single input that identifies them.
 *
 * The class is added by JavaScript only. With JS off, or before it runs,
 * everything is visible — the form is never trapped.
 */
.kasafik-ico-pending .woocommerce-billing-fields__field-wrapper > .form-row ~ .form-row {
	display: none;
}

/* Keep the collapsed state obvious while the reveal is active. */
.kasafik-ico-pending .kasafik-ico-field {
	margin-bottom: 0;
}