/*
 * ATE Minimum Order — frontend styles.
 * Design tokens mirroring the Ali Tandoori Express brand.
 */

.ate-min,
.ate-min-sticky {
	--ate-espresso: #150d08;
	--ate-espresso-light: #1f140c;
	--ate-burgundy: #3a1116;
	--ate-burgundy-light: #52191e;
	--ate-gold: #c9a24b;
	--ate-gold-light: #f2dfa8;
	--ate-cream: #f4ecdd;
	--ate-cream-muted: #cdbfa8;
	--ate-border: rgba(201, 162, 75, 0.35);
}

/* ===== Progress widget ===== */
.ate-min {
	box-sizing: border-box;
}
.ate-min *,
.ate-min *::before,
.ate-min *::after {
	box-sizing: border-box;
}
.ate-min__inner {
	background: linear-gradient(135deg, var(--ate-espresso-light), var(--ate-espresso));
	border: 1px solid var(--ate-border);
	border-radius: 14px;
	padding: 16px 18px;
	color: var(--ate-cream);
	font-family: inherit;
	margin-bottom: 22px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}
.ate-min__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.ate-min__icon {
	color: var(--ate-gold);
	display: inline-flex;
	line-height: 0;
}
.ate-min__flame,
.ate-min__check {
	width: 22px;
	height: 22px;
}
.ate-min__title {
	font-weight: 700;
	letter-spacing: 0.02em;
	font-size: 1.02em;
	color: var(--ate-gold-light);
}
.ate-min__track {
	display: block;
	width: 100%;
	height: 10px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid var(--ate-border);
}
.ate-min__fill {
	display: block;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--ate-gold), var(--ate-gold-light));
	transition: width 0.5s ease;
}
.ate-min__meta {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: baseline;
	margin-top: 8px;
	font-size: 0.92em;
}
.ate-min__line {
	color: var(--ate-cream-muted);
}
.ate-min__pct {
	font-weight: 700;
	color: var(--ate-gold);
}
.ate-min__msg {
	margin-top: 10px;
	font-size: 0.95em;
	color: var(--ate-cream-muted);
}
.ate-min__btn {
	display: inline-block;
	margin-top: 14px;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--ate-gold);
	color: var(--ate-espresso);
	font-weight: 700;
	text-decoration: none;
	font-size: 0.92em;
	transition: background 0.2s ease, transform 0.2s ease;
	min-height: 44px;
	line-height: 1.2;
}
.ate-min__btn:hover,
.ate-min__btn:focus {
	background: var(--ate-gold-light);
	color: var(--ate-espresso);
	text-decoration: none;
	transform: translateY(-1px);
}
.ate-min__btn-block {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 18px;
}

/* ===== Reached / success ===== */
.ate-min--met .ate-min__inner {
	border-color: rgba(201, 162, 75, 0.55);
}
.ate-min--met .ate-min__title,
.ate-min--met .ate-min__msg {
	color: var(--ate-cream);
}

/* ===== Sticky mobile bar ===== */
.ate-min-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	background: rgba(21, 13, 8, 0.96);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border-top: 1px solid var(--ate-border);
	padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}
.ate-min-sticky__row {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 720px;
	margin: 0 auto;
}
.ate-min-sticky__track {
	display: block;
	flex: 1 1 auto;
	height: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
	border: 1px solid var(--ate-border);
}
.ate-min-sticky__fill {
	display: block;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--ate-gold), var(--ate-gold-light));
	transition: width 0.5s ease;
}
.ate-min-sticky__text {
	flex: 0 0 auto;
	font-size: 0.85em;
	color: var(--ate-cream);
	line-height: 1.25;
}

/* ===== Express checkout suppression (below minimum) ===== */
body.ate-min-below #wc-stripe-express-checkout-element,
body.ate-min-below #wc-stripe-payment-request-wrapper,
body.ate-min-below #ppcp-button,
body.ate-min-below .ppcp-button-container,
body.ate-min-below #apple-pay-button,
body.ate-min-below #google-pay-button {
	display: none !important;
}

/* ===== Responsive + accessibility ===== */
@media (max-width: 600px) {
	.ate-min__inner {
		padding: 14px;
		border-radius: 12px;
	}
	.ate-min-sticky__text {
		font-size: 0.78em;
	}
}

@media (min-width: 601px) and (max-width: 1440px) {
	.ate-min-sticky__row {
		max-width: 820px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ate-min__fill,
	.ate-min-sticky__fill {
		transition: none;
	}
	.ate-min__flame animate,
	.ate-min__flame *,
	.ate-min__check * {
		animation: none !important;
		-webkit-animation: none !important;
	}
	.ate-min__btn {
		transition: none;
		transform: none;
	}
	.ate-min__btn:hover,
	.ate-min__btn:focus {
		transform: none;
	}
}

/* Focus visibility */
.ate-min__btn:focus-visible,
.ate-min a:focus-visible {
	outline: 2px solid var(--ate-gold);
	outline-offset: 2px;
}