/**
 * Public styles for Bakery Delivery.
 */

body.single-product div.product {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0;
	max-width: 100%;
}

body.single-product div.product .woocommerce-product-gallery {
	box-sizing: border-box;
	width: 45%;
	float: none;
	padding-right: 34px;
}

body.single-product div.product .summary {
	box-sizing: border-box;
	width: 55%;
	float: none;
	padding-left: 18px;
	max-width: 100%;
}

body.single-product div.product .woocommerce-tabs,
body.single-product div.product .related,
body.single-product div.product .upsells {
	width: 100%;
}

body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
body.single-product div.product .woocommerce-product-gallery img {
	border-radius: 10px;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
	width: 74px;
	margin: 0;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs img {
	border: 1px solid var( --bakery-delivery-quantity-border );
	border-radius: 8px;
	transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs img:hover,
body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	border-color: var( --bakery-delivery-add-cart-hover-border );
	opacity: 1;
	transform: translateY( -1px );
}

body.single-product div.product .summary .product_title {
	margin-bottom: 12px;
	color: var( --bakery-delivery-quantity-text );
	font-size: clamp( 28px, 3vw, 42px );
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0;
}

body.single-product div.product .summary .woocommerce-product-details__short-description {
	margin-bottom: 18px;
	color: var( --bakery-delivery-time-text );
	font-size: 16px;
	line-height: 1.65;
}
/* The custom price row is the only product price shown in the summary. */
body.single-product div.product .summary .price,
body.single-product div.product .summary .woocommerce-variation-price {
	display: none !important;
}

.bakery-delivery-prices {
	display: flex;
	align-items: baseline;
	flex-wrap: nowrap;
	gap: 14px;
	margin: 0 0 20px;
}

.bakery-delivery-prices__regular,
.bakery-delivery-prices__sale {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
}

.bakery-delivery-prices__regular {
	color: var( --bakery-delivery-time-text );
	text-decoration-thickness: 2px;
}

.bakery-delivery-prices__sale {
	color: var( --bakery-delivery-validation-error );
	font-size: 24px;
	text-decoration: none;
}
.bakery-delivery {
	clear: both;
	box-sizing: border-box;
	display: grid;
	gap: 18px;
	width: 100%;
	max-width: 100%;
	margin: 18px 0 0;
	padding: 22px;
	border: 1px solid var( --bakery-delivery-quantity-border );
	border-radius: 12px;
	background: var( --bakery-delivery-quantity-background );
	box-shadow: 0 14px 34px color-mix( in srgb, var( --bakery-delivery-quantity-text ) 8%, transparent );
}

.bakery-delivery__field,
.bakery-delivery__total {
	box-sizing: border-box;
	display: grid;
	gap: 9px;
	min-width: 0;
	max-width: 100%;
}

.bakery-delivery__label {
	display: block;
	margin: 0;
	color: var( --bakery-delivery-time-text );
	font-size: 14px;
	font-weight: 800;
	line-height: 1.35;
}

.bakery-delivery__quantity-control {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
	width: fit-content;
	max-width: 100%;
}

.bakery-delivery__quantity-control .quantity {
	box-sizing: border-box;
	display: flex !important;
	align-items: center;
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 190px !important;
	max-width: none !important;
	margin: 0;
}

.bakery-delivery__quantity-control input.qty {
	box-sizing: border-box;
	field-sizing: content;
	width: auto !important;
	min-width: 190px !important;
	max-width: none !important;
	height: 45px;
	min-height: 45px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var( --bakery-delivery-quantity-border );
	border-radius: 8px;
	background: var( --bakery-delivery-quantity-background );
	color: var( --bakery-delivery-quantity-text );
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.bakery-delivery__quantity-control input.qty::placeholder {
	color: var( --bakery-delivery-quantity-text );
	opacity: 1;
	text-overflow: clip;
}
.bakery-delivery__quantity-control input.qty:focus,
.bakery-delivery__select:focus {
	border-color: var( --bakery-delivery-add-cart-hover-border );
	box-shadow: 0 0 0 3px color-mix( in srgb, var( --bakery-delivery-add-cart-hover-border ) 14%, transparent );
	outline: 0;
}

.bakery-delivery__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 45px;
	align-self: center;
	width: 45px;
	min-width: 45px;
	height: 45px;
	min-height: 45px;
	padding: 0;
	border: 1px solid var( --bakery-delivery-plus-border );
	border-radius: 8px;
	background: var( --bakery-delivery-plus-background );
	color: var( --bakery-delivery-plus-icon );
	cursor: pointer;
	font-size: 21px;
	font-weight: 800;
	line-height: 1;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.bakery-delivery__step:hover {
	transform: translateY( -1px );
}

.bakery-delivery__step[data-bakery-quantity-step="-1"] {
	border-color: var( --bakery-delivery-minus-border );
	background: var( --bakery-delivery-minus-background );
	color: var( --bakery-delivery-minus-icon );
}

.bakery-delivery__formula {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var( --bakery-delivery-quantity-text );
	font-size: 16px;
	line-height: 1.4;
}

.bakery-delivery__amount {
	color: var( --bakery-delivery-quantity-text );
	font-size: 20px;
	font-weight: 900;
}

.bakery-delivery__dates {
	box-sizing: border-box;
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 8px;
	width: fit-content;
	max-width: 100%;
}

.bakery-delivery__date-option {
	position: relative;
	box-sizing: border-box;
	display: block;
	flex: 0 0 auto;
	max-width: 100%;
}

.bakery-delivery__date-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.bakery-delivery__date-card {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: auto;
	max-width: 100%;
	height: 48px;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var( --bakery-delivery-today-normal-border );
	border-radius: 8px;
	background: var( --bakery-delivery-today-normal-background );
	color: var( --bakery-delivery-today-normal-text );
	cursor: pointer;
	font-family: inherit;
	text-align: center;
	transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.bakery-delivery__date-title {
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
}

.bakery-delivery__date-picker {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 1px;
	height: 1px;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.bakery-delivery__date-option input:disabled + .bakery-delivery__date-card {
	opacity: 0.5;
	cursor: not-allowed;
}

.bakery-delivery__date-option input:not(:disabled):checked + .bakery-delivery__date-card {
	border-color: var( --bakery-delivery-today-active-border );
	background: var( --bakery-delivery-today-active-background );
	color: var( --bakery-delivery-today-active-text );
	box-shadow: none;
}

.bakery-delivery__date-option input:not(:disabled):focus-visible + .bakery-delivery__date-card {
	outline: 2px solid var( --bakery-delivery-today-active-border );
	outline-offset: 2px;
}

.bakery-delivery__date-card:focus-visible {
	outline: 2px solid var( --bakery-delivery-today-active-border );
	outline-offset: 2px;
}

.bakery-delivery__date-option input:not(:disabled):not(:checked) + .bakery-delivery__date-card:hover {
	border-color: var( --bakery-delivery-today-hover-border );
	background: var( --bakery-delivery-today-hover-background );
	color: var( --bakery-delivery-today-hover-text );
	transform: translateY( -1px );
}

.bakery-delivery__date-option--picker .bakery-delivery__date-card {
	border-color: var( --bakery-delivery-select-normal-border );
	background: var( --bakery-delivery-select-normal-background );
	color: var( --bakery-delivery-select-normal-text );
}

.bakery-delivery__date-option--picker input:not(:disabled):checked + .bakery-delivery__date-card {
	border-color: var( --bakery-delivery-select-active-border );
	background: var( --bakery-delivery-select-active-background );
	color: var( --bakery-delivery-select-active-text );
}

.bakery-delivery__date-option--picker input:not(:disabled):not(:checked) + .bakery-delivery__date-card:hover {
	border-color: var( --bakery-delivery-select-hover-border );
	background: var( --bakery-delivery-select-hover-background );
	color: var( --bakery-delivery-select-hover-text );
}

.bakery-delivery__date-option--picker input:not(:disabled):focus-visible + .bakery-delivery__date-card,
.bakery-delivery__date-option--picker .bakery-delivery__date-card:focus-visible {
	outline-color: var( --bakery-delivery-select-active-border );
}

.bakery-delivery-toast {
	position: fixed;
	top: 24px;
	left: 50%;
	z-index: 99999;
	max-width: min( 360px, calc( 100vw - 32px ) );
	padding: 12px 16px;
	border-radius: 8px;
	background: var( --bakery-delivery-success-popup-background );
	color: var( --bakery-delivery-success-popup-text );
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	box-shadow: 0 12px 28px color-mix( in srgb, var( --bakery-delivery-quantity-text ) 18%, transparent );
	opacity: 0;
	transform: translate( -50%, -8px );
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease;
}

.bakery-delivery-toast.is-visible {
	opacity: 1;
	transform: translate( -50%, 0 );
}

.bakery-delivery__select {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var( --bakery-delivery-time-border );
	border-radius: 8px;
	background: var( --bakery-delivery-time-background );
	color: var( --bakery-delivery-time-text );
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.bakery-delivery__select:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bakery-delivery__quick {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	max-width: 100%;
	padding: 12px 14px;
	border: 1px solid var( --bakery-delivery-quick-border );
	border-radius: 8px;
	background: var( --bakery-delivery-quick-background );
}

.bakery-delivery__quick-label {
	min-width: 0;
	color: var( --bakery-delivery-quick-text );
	font-size: 14px;
	font-weight: 800;
	line-height: 1.35;
}

.bakery-delivery__quick-link {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-height: 38px;
	padding: 9px 14px;
	border: 1px solid var( --bakery-delivery-quick-border );
	border-radius: 8px;
	background: var( --bakery-delivery-quick-background );
	color: var( --bakery-delivery-quick-text );
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.bakery-delivery__quick-link:hover,
.bakery-delivery__quick-link:focus {
	background: var( --bakery-delivery-quick-text );
	color: var( --bakery-delivery-quick-background );
}

.bakery-delivery__message {
	min-height: 20px;
	color: var( --bakery-delivery-validation-error );
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
}

body.single-product form.cart:has( .bakery-delivery ) .single_add_to_cart_button {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 50px;
	margin: 0;
	border-color: var( --bakery-delivery-add-cart-normal-border );
	border-radius: 8px;
	background: var( --bakery-delivery-add-cart-normal-background );
	color: var( --bakery-delivery-add-cart-normal-text );
	font-weight: 800;
	transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body.single-product form.cart:has( .bakery-delivery ) .single_add_to_cart_button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

body.single-product form.cart.bakery-delivery-valid:has( .bakery-delivery ) .single_add_to_cart_button:hover {
	border-color: var( --bakery-delivery-add-cart-hover-border );
	background: var( --bakery-delivery-add-cart-hover-background );
	color: var( --bakery-delivery-add-cart-hover-text );
	transform: translateY( -1px );
	box-shadow: 0 10px 20px color-mix( in srgb, var( --bakery-delivery-quantity-text ) 14%, transparent );
}

@media ( max-width: 1024px ) {
	body.single-product div.product .woocommerce-product-gallery,
	body.single-product div.product .summary {
		width: 50%;
	}

	body.single-product div.product .woocommerce-product-gallery {
		padding-right: 24px;
	}

	body.single-product div.product .summary {
		padding-left: 12px;
	}
}

@media ( max-width: 767px ) {
	body.single-product div.product {
		display: block;
		max-width: 100%;
	}

	body.single-product div.product .woocommerce-product-gallery,
	body.single-product div.product .summary {
		width: 100%;
		padding-right: 0;
		padding-left: 0;
	}

	body.single-product div.product .summary {
		margin-top: 24px;
	}

	.bakery-delivery {
		padding: 16px;
	}

	.bakery-delivery__quantity-control {
		display: flex;
		width: 100%;
	}

	.bakery-delivery__quantity-control .quantity {
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: 100% !important;
	}

	.bakery-delivery__quantity-control input.qty {
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
	}
}

@media ( max-width: 480px ) {
	.bakery-delivery__dates {
		width: 100%;
	}

	.bakery-delivery__date-option {
		flex: 1 1 auto;
	}

	.bakery-delivery__date-card {
		width: 100%;
	}

	.bakery-delivery__quick {
		align-items: flex-start;
		justify-content: flex-start;
	}

}

@media ( max-width: 360px ) {
	.bakery-delivery {
		padding: 14px;
	}

	.bakery-delivery__step {
		flex-basis: 40px;
		width: 40px;
		min-width: 40px;
	}
}

@media ( max-width: 340px ) {
	.bakery-delivery__dates {
		flex-direction: column;
	}

	.bakery-delivery {
		padding: 12px;
	}
}
