/* Cart and checkout fixes (FIXMOBILE test purchase, 25/11). */

/*
 * The order summary sticks 20px from the top (Core), i.e. behind the theme's
 * sticky header: let it stick just below the header instead.
 */
@media (min-width: 992px) {
	.woocommerce-checkout form.checkout .sticky-top {
		top: calc(var(--wetr-header-h, 0px) + 16px) !important;
	}
}

/*
 * Stripe's card fields are cross-origin iframes. While scrolling, they were
 * painted as grey boxes over the sticky header (FIXMOBILE screenshot 25/11).
 * Keep the payment box in its own stacking context, under the header (1000).
 * (No transform on the header: its mobile menu panels are position:fixed.)
 */
.woocommerce-checkout form.checkout #payment,
.woocommerce-checkout form.checkout .payment-methods {
	position: relative;
	z-index: 0;
	isolation: isolate;
}

/* Anything scrolled into view (errors, links in the error list) clears the header. */
.woocommerce-checkout form.checkout .woocommerce-NoticeGroup,
.woocommerce-checkout form.checkout .form-row,
.woocommerce-checkout form.checkout #payment {
	scroll-margin-top: calc(var(--wetr-header-h, 0px) + 24px);
}

/* Invalid fields: red border and the message under the field. */
.woocommerce-checkout .form-row.woocommerce-invalid .input-text,
.woocommerce-checkout .form-row.woocommerce-invalid select,
.woocommerce-checkout .form-row.woocommerce-invalid .select2-selection,
.woocommerce-checkout .form-row .input-text[aria-invalid="true"] {
	border: 1px solid #da2f31 !important;
}

.woocommerce-checkout .form-row.woocommerce-invalid input[type="checkbox"] {
	outline: 2px solid #da2f31;
	outline-offset: 2px;
}

.woocommerce-checkout .checkout-inline-error-message {
	display: block !important;
	margin: 6px 0 0;
	color: #ff6b6b;
	font-size: 13px;
	line-height: 1.4;
}

/* Two messages for one field (ours and WooCommerce's): show one. */
.woocommerce-checkout .form-row .checkout-inline-error-message ~ .checkout-inline-error-message {
	display: none !important;
}

/* eSIM ships nothing: no empty «Επιλογές αποστολής» box. */
body.wetr-no-shipping .d-white.shipping-methods {
	display: none !important;
}

/* A shared cart link would add a bare eSIM without its plan. */
.woocommerce-cart .we-share-cart {
	display: none !important;
}
