/* Theme 1.4.49: fixes from the real-device (Android, Chrome) run. Loaded last; logical properties only, so RTL mirrors. */

/* (1) Cart FAB: fixed controls cannot be moved off content that scrolls beneath them, so every page that ends in
   its own content gets bottom room equal to the FAB footprint (58px + 74px offset + safe area), and the cart and
   checkout totals keep a gutter at the FAB side so an amount is never clipped by the bubble. */
:root { --bld-fab-clear: calc(150px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 768px) {
	body.woocommerce-cart .wc-block-cart,
	body.woocommerce-checkout .wc-block-checkout,
	body.woocommerce-checkout .woocommerce-order,
	body.woocommerce-account .woocommerce,
	#vendorLoginShell {
		padding-block-end: calc(var(--bld-fab-clear) + var(--bld-consent-h, 0px));
	}
	body.woocommerce-cart .wc-block-components-totals-item,
	body.woocommerce-checkout .wc-block-components-totals-item,
	body.woocommerce-checkout .wc-block-components-checkout-order-summary__title-price,
	body.woocommerce-checkout .wc-block-components-order-summary-item__total-price {
		padding-inline-end: 56px;
	}
}

/* (2) Block checkout address card: the Edit link stays on one line; phone numbers read left to right. */
.wc-block-components-address-card {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.wc-block-components-address-card address { flex: 1 1 auto; min-width: 0; }
.wc-block-components-address-card__edit,
.wc-block-components-address-card .wc-block-components-address-card__edit {
	flex: 0 0 auto;
	white-space: nowrap;
}
.bld-ltr,
a[href^="tel:"],
.wc-block-components-address-card [class*="phone"],
.woocommerce-customer-details--phone {
	unicode-bidi: isolate;
	direction: ltr;
	text-align: end;
}

/* (3) Cart drawer with the buyer-details form open: the whole drawer scrolls, so the footer stops being pinned
   (it used to take two thirds of the screen) and, with the keyboard up, the drawer is sized to the visual viewport. */
@media (max-width: 768px) {
	.drawer.is-buyer-open .drawer-foot { position: static; }
	/* 1.4.68: with the details form open the drawer is one scroll column, content height only: no flex growth or double bottom padding
	   (body + footer) left under the last button, and no safe-area padding while the keyboard is up. */
	.drawer.is-buyer-open { min-height: 0; }
	.drawer.is-buyer-open .drawer-body,
	.drawer.is-buyer-open .drawer-foot { flex: 0 0 auto; min-height: 0; }
	.drawer.is-buyer-open .drawer-body { padding-block-end: 0; }
	.drawer.is-buyer-open .drawer-foot { padding-block-start: 12px; }
	.drawer.bld-vv .drawer-foot { padding-block-end: 16px; }
	.drawer.bld-vv {
		top: var(--bld-vvt, 0px);
		bottom: auto;
		height: var(--bld-vvh, 100dvh);
		max-height: var(--bld-vvh, 100dvh);
	}
}

/* (5) Sign-in "keep me signed in" box: at least 24px at every width, both languages. */
#vendorLoginShell input[type="checkbox"],
.bld-login__remember input[type="checkbox"] {
	width: 24px;
	height: 24px;
	min-width: 24px;
	flex: 0 0 auto;
	margin: 0;
	accent-color: var(--gold);
}

/* (6) Lost / reset password: WooCommerce paints its own white field with a more specific selector. */
html body .woocommerce form.woocommerce-ResetPassword input.input-text,
html body .woocommerce form.lost_reset_password input.input-text,
html body form.woocommerce-ResetPassword input.woocommerce-Input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 15px;
	background-color: var(--navy-600);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--r-md);
	color: var(--white);
	caret-color: var(--gold);
	outline: none;
}
html body .woocommerce form.woocommerce-ResetPassword input.input-text:focus,
html body .woocommerce form.lost_reset_password input.input-text:focus,
html body form.woocommerce-ResetPassword input.woocommerce-Input:focus {
	border-color: rgba(212, 168, 75, 0.6);
}
html body form.woocommerce-ResetPassword input.input-text:-webkit-autofill {
	-webkit-text-fill-color: var(--white);
	box-shadow: 0 0 0 1000px var(--navy-600) inset;
}

/* (7) Thank-you order summary: equal columns, no float/clearfix leftovers; stacked on phones. */
html body ul.woocommerce-order-overview.order_details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 8px 24px;
	overflow: visible;
}
html body ul.woocommerce-order-overview.order_details::before,
html body ul.woocommerce-order-overview.order_details::after {
	content: none;
	display: none;
}
html body ul.woocommerce-order-overview.order_details li {
	float: none;
	margin: 0;
	padding: 8px 0;
	border: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}
@media (max-width: 640px) {
	html body ul.woocommerce-order-overview.order_details { grid-template-columns: minmax(0, 1fr); gap: 0; }
	html body ul.woocommerce-order-overview.order_details li { border-block-end: 1px dashed rgba(255, 255, 255, 0.12); }
	html body ul.woocommerce-order-overview.order_details li:last-child { border-block-end: 0; }
}
