/* Trillzo Plugin — cart + checkout styles. Accent colour: --tzc-accent (set in settings). */

:root { --tzc-accent: #B84D00; }

/* ---------------------------------------------------------------- Zone */

.tzc-zone-error {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 1px solid #c0392b;
	border-left-width: 4px;
	border-radius: 4px;
	background: #fdf3f2;
	color: #a5281b;
	font-size: 14px;
	line-height: 1.45;
	box-sizing: border-box;
}
.tzc-zone-error::before { content: '\26A0'; font-size: 16px; line-height: 1.3; }

.tzc-zip-locked { background-color: #f3f3f3 !important; }

.tzc-delivery-na { color: #6b6b6b; font-size: 14px; }

.tzc-review-wait { margin: 8px 0; color: #b32d2e; font-size: 14px; }

/* ------------------------------------------------------- Delivery time */

.woocommerce-checkout #billing_delivery_time,
.woocommerce-checkout .delivery-asap-field { display: none !important; }
#billing_delivery_time_field > label .optional { display: none; }

.delivery-time-wrapper { position: relative; margin-bottom: 20px; width: 100%; box-sizing: border-box; }
.delivery-legend { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #333; }

.delivery-segmented {
	display: flex;
	width: 100%;
	border: 1px solid var(--tzc-accent);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	box-sizing: border-box;
}
.delivery-seg-btn {
	flex: 1 1 50%;
	min-width: 0;
	margin: 0;
	padding: 13px 10px;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: var(--tzc-accent);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background .15s, color .15s;
	box-sizing: border-box;
	-webkit-appearance: none !important;
	appearance: none !important;
}
.delivery-seg-btn + .delivery-seg-btn { border-left: 1px solid var(--tzc-accent); }
.delivery-seg-btn:hover { background: color-mix(in srgb, var(--tzc-accent) 12%, #fff); }
.delivery-seg-btn[aria-checked="true"] { background: var(--tzc-accent) !important; color: #fff !important; }
.delivery-seg-btn:focus-visible { outline: 2px solid var(--tzc-accent); outline-offset: -4px; }
.delivery-seg-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.delivery-summary { margin-top: 10px; font-size: 14px; font-weight: 500; color: #2f2f2f; }
.delivery-time-wrapper:not(.is-scheduled):not(.is-closed) .delivery-summary { display: none; }
.delivery-summary::before { content: '\2713\00a0'; color: #1e8449; font-weight: 700; }
.delivery-summary.is-prompt { color: #b34700; }
.delivery-summary.is-prompt::before { content: '\26A0\00a0'; color: #b34700; }

.delivery-pick-row { position: relative; display: none; margin-top: 12px; }
.delivery-time-wrapper.is-scheduled .delivery-pick-row { display: block; }
.delivery-time-wrapper .flatpickr-wrapper { width: 100% !important; display: block !important; }
.delivery-time-wrapper input.delivery-flatpickr-input {
	width: 100% !important;
	max-width: 100% !important;
	display: block !important;
	float: none !important;
	box-sizing: border-box !important;
	padding: 12px 40px 12px 14px !important;
	border: 1px solid #ccc !important;
	border-radius: 4px !important;
	font-size: 15px !important;
	color: #333 !important;
	background: #fff !important;
	cursor: pointer !important;
}
.delivery-time-wrapper input.delivery-flatpickr-input:focus {
	outline: none !important;
	border-color: var(--tzc-accent) !important;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--tzc-accent) 15%, transparent) !important;
}
.delivery-clear-btn {
	display: none;
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 26px;
	height: 26px;
	padding: 0;
	line-height: 1;
	font-size: 20px;
	color: #999;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.delivery-clear-btn:hover { color: var(--tzc-accent); }
.delivery-time-wrapper.has-time .delivery-clear-btn { display: block; }

.woocommerce-checkout-review-order-table tr.delivery-timing-row th,
.woocommerce-checkout-review-order-table tr.delivery-timing-row td { border-top: 1px solid rgba(0,0,0,.08); }
.woocommerce-checkout-review-order-table tr.delivery-timing-row td { font-weight: 600; }
.woocommerce-checkout-review-order-table tr.delivery-timing-row--warn td { color: #b34700; }

.flatpickr-day.selected,
.flatpickr-day.selected:hover { background: var(--tzc-accent) !important; border-color: var(--tzc-accent) !important; }
.flatpickr-current-month .numInputWrapper { display: none !important; }

/* ----------------------------------------------------------------- Tip */

.tzc-tip { margin: 0 0 18px; padding: 0; border: 0; }
.tzc-tip__legend { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #333; }
.tzc-tip__options { display: flex; flex-wrap: wrap; gap: 8px; }
.tzc-tip__option { position: relative; flex: 1 1 70px; margin: 0; }
.tzc-tip__option input { position: absolute; opacity: 0; pointer-events: none; }
.tzc-tip__option span {
	display: block;
	padding: 11px 8px;
	border: 1px solid var(--tzc-accent);
	border-radius: 6px;
	color: var(--tzc-accent);
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.tzc-tip__option input:checked + span { background: var(--tzc-accent); color: #fff; }
.tzc-tip__option input:focus-visible + span { outline: 2px solid var(--tzc-accent); outline-offset: 2px; }
.tzc-tip .tip-custom-field { margin: 10px 0 0; }

.tip-custom-wrapper { position: relative; display: flex; align-items: center; }
.tip-custom-wrapper .tip-dollar { position: absolute; left: 12px; color: #333; font-weight: bold; pointer-events: none; z-index: 1; }
.tip-custom-wrapper input { padding-left: 24px !important; }
.tzc-tip-note { margin: 6px 0 0; font-size: 13px; color: #6b6b6b; }

/* ---------------------------------------------------- Gate and wallets */

.tzc-pay-locked { opacity: .45; filter: grayscale(1); pointer-events: none; user-select: none; }
#tzc-pay-note {
	margin: 0 0 14px;
	padding: 12px 14px;
	border: 1px solid #ececec;
	border-left: 4px solid var(--tzc-accent);
	border-radius: 4px;
	background: #fff8f1;
	color: #333;
	font-size: 14px;
	line-height: 1.45;
}

#tzc-express-wrap { margin-bottom: 16px; }
#tzc-express-wrap #wc-stripe-express-checkout-button-separator { margin: 12px 0 0; text-align: center; }
#tzc-express-box { position: relative; }
#tzc-express-shield {
	display: none;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: not-allowed;
	z-index: 5;
}
#tzc-express-note { display: none; margin: 8px 0 0; font-size: 14px; line-height: 1.4; text-align: center; color: #555; }
#tzc-express-wrap.is-locked #tzc-express-shield,
#tzc-express-wrap.is-locked #tzc-express-note { display: block; }
#tzc-express-wrap.is-locked #wc-stripe-express-checkout-element { opacity: .4; filter: grayscale(1); }
#tzc-express-wrap.no-wallet #tzc-express-note,
#tzc-express-wrap.no-wallet #tzc-express-shield { display: none !important; }

/* -------------------------------------------------------------- Labels */

.tzc-terms-notice { margin: 12px 0 14px; font-size: 14px; line-height: 1.5; color: #333; }
.tzc-terms-notice a { text-decoration: underline; }
