/**
 * Same-Day Express Delivery - front-end styling.
 *
 * Scoped either to .amazol-sdx-* markup this plugin owns, or to
 * body.amazol-sdx-active, which is only present while the Same-Day Express
 * payment method is the selected one. Nothing here can leak into any other
 * checkout state or any other shipping method.
 */

:root {
	--amazol-sdx-green: #25d366;
	--amazol-sdx-green-dark: #1da851;
	--amazol-sdx-ink: #1f2933;
}

/* Checkout notice, rendered inside the payment method body, which sits
   immediately above the place-order button. */

.amazol-sdx-notice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 4px 0 2px;
	padding: 14px 16px;
	border: 1px solid rgba(37, 211, 102, 0.35);
	border-left: 4px solid var(--amazol-sdx-green);
	border-radius: 6px;
	background: rgba(37, 211, 102, 0.07);
	color: var(--amazol-sdx-ink);
	font-size: 0.875em;
	line-height: 1.55;
}

.amazol-sdx-notice__icon {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2325d366'%3E%3Cpath d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

.amazol-sdx-label {
	font-weight: 600;
}
/* The Place Order button, only while Same-Day Express is the chosen method.
   body.amazol-sdx-active is added and removed by the payment method component,
   so every other checkout keeps the theme's own button styling untouched. */

body.amazol-sdx-active .wc-block-components-checkout-place-order-button,
body.amazol-sdx-active .wc-block-checkout__actions_row button[type="submit"],
body.amazol-sdx-active #place_order {
	position: relative;
	background: var(--amazol-sdx-green) !important;
	border-color: var(--amazol-sdx-green) !important;
	color: #fff !important;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding-left: 3em !important;
	transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

body.amazol-sdx-active .wc-block-components-checkout-place-order-button::before,
body.amazol-sdx-active .wc-block-checkout__actions_row button[type="submit"]::before,
body.amazol-sdx-active #place_order::before {
	content: "";
	position: absolute;
	left: 1.15em;
	top: 50%;
	width: 1.35em;
	height: 1.35em;
	transform: translateY(-50%);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.372-.025-.521-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884a9.82 9.82 0 016.988 2.896 9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.548 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
}

body.amazol-sdx-active .wc-block-components-checkout-place-order-button:hover:not(:disabled),
body.amazol-sdx-active #place_order:hover:not(:disabled) {
	background: var(--amazol-sdx-green-dark) !important;
	border-color: var(--amazol-sdx-green-dark) !important;
}

body.amazol-sdx-active .wc-block-components-checkout-place-order-button:focus-visible,
body.amazol-sdx-active #place_order:focus-visible {
	outline: 2px solid var(--amazol-sdx-green-dark);
	outline-offset: 2px;
}
/* Order-received hand-off block. */

.amazol-sdx-handoff {
	margin: 0 0 2em;
	padding: 1.4em 1.5em;
	border: 1px solid rgba(37, 211, 102, 0.35);
	border-radius: 8px;
	background: rgba(37, 211, 102, 0.06);
}

.amazol-sdx-handoff__notice {
	margin: 0 0 1.1em;
	color: var(--amazol-sdx-ink);
	font-size: 0.95em;
	line-height: 1.6;
}

.amazol-sdx-handoff__hint {
	margin: 0.85em 0 0;
	font-size: 0.82em;
	opacity: 0.7;
}

.amazol-sdx-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65em;
	padding: 0.95em 1.6em;
	border: 0;
	border-radius: 6px;
	background: var(--amazol-sdx-green);
	color: #fff !important;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	transition: background-color 0.18s ease, transform 0.06s ease;
}

.amazol-sdx-button:hover,
.amazol-sdx-button:focus {
	background: var(--amazol-sdx-green-dark);
	color: #fff !important;
}

.amazol-sdx-button:active {
	transform: translateY(1px);
}

.amazol-sdx-button:focus-visible {
	outline: 2px solid var(--amazol-sdx-green-dark);
	outline-offset: 2px;
}

.amazol-sdx-button__icon {
	flex: 0 0 1.35em;
	width: 1.35em;
	height: 1.35em;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.372-.025-.521-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884a9.82 9.82 0 016.988 2.896 9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.548 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
}

/* Full width on mobile, natural width from tablet up. */

@media (max-width: 767px) {

	.amazol-sdx-button {
		width: 100%;
	}

	body.amazol-sdx-active .wc-block-components-checkout-place-order-button,
	body.amazol-sdx-active #place_order {
		width: 100%;
		display: block;
	}

	.amazol-sdx-notice {
		font-size: 0.84em;
		padding: 12px 13px;
	}
}

@media (min-width: 768px) {

	.amazol-sdx-button {
		min-width: 320px;
	}
}
/* Classic / ShopBuilder checkout.
   The place-order button carries data-amazol-sdx="1" only while Same-Day Express
   is the chosen shipping method. The attribute is re-applied on every
   wc-ajax=update_order_review response, so the styling tracks the customer
   switching shipping methods without a page reload, and no other checkout state
   is ever touched. */

button[data-amazol-sdx="1"],
#place_order[data-amazol-sdx="1"] {
	position: relative;
	background: var(--amazol-sdx-green) !important;
	border-color: var(--amazol-sdx-green) !important;
	color: #fff !important;
	font-weight: 600;
	padding-left: 3em !important;
	transition: background-color 0.18s ease;
}

button[data-amazol-sdx="1"]::before,
#place_order[data-amazol-sdx="1"]::before {
	content: "";
	position: absolute;
	left: 1.15em;
	top: 50%;
	width: 1.35em;
	height: 1.35em;
	transform: translateY(-50%);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.372-.025-.521-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884a9.82 9.82 0 016.988 2.896 9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.548 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
}

button[data-amazol-sdx="1"]:hover:not(:disabled),
#place_order[data-amazol-sdx="1"]:hover:not(:disabled) {
	background: var(--amazol-sdx-green-dark) !important;
	border-color: var(--amazol-sdx-green-dark) !important;
}

button[data-amazol-sdx="1"]:focus-visible,
#place_order[data-amazol-sdx="1"]:focus-visible {
	outline: 2px solid var(--amazol-sdx-green-dark);
	outline-offset: 2px;
}

@media (max-width: 767px) {

	button[data-amazol-sdx="1"],
	#place_order[data-amazol-sdx="1"] {
		width: 100%;
		display: block;
	}
}