/* ==========================================================================
   Shared base — every style uses these CSS variables (set inline per-site
   from the admin color pickers), so colors are consistent across layouts.
   ========================================================================== */

.cfdo-offer-box {
	margin: 16px 0;
	--cfdo-radius: 8px;
}

.cfdo-offer-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--cfdo-bg, #fff7e6);
	border: 1px solid var(--cfdo-border, #ffcf6b);
	border-radius: var(--cfdo-radius);
	padding: 14px 18px;
}

.cfdo-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cfdo-headline {
	font-size: 15px;
	color: var(--cfdo-text, #7a4a00);
}

.cfdo-subtext {
	font-size: 13px;
	color: var(--cfdo-subtext, #8a6a2e);
}

.cfdo-countdown {
	font-size: 13px;
	color: var(--cfdo-text, #7a4a00);
	font-weight: 600;
	margin-top: 4px;
}

.cfdo-timer {
	font-variant-numeric: tabular-nums;
	font-family: monospace;
	font-size: 14px;
	background: var(--cfdo-timer-bg, #ffe2c9);
	color: var(--cfdo-timer-text, #a13a1f);
	padding: 1px 6px;
	border-radius: 4px;
}

.cfdo-button {
	background: var(--cfdo-button-bg, #e0752c);
	color: var(--cfdo-button-text, #fff);
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: filter 0.2s ease;
}

.cfdo-button:hover {
	filter: brightness(0.92);
}

.cfdo-button:disabled {
	opacity: 0.7;
	cursor: default;
}

.cfdo-offer-inner.cfdo-applied {
	background: var(--cfdo-applied-bg, #e9f9ee);
	border-color: var(--cfdo-applied-border, #77d99a);
	justify-content: flex-start;
}

.cfdo-icon {
	color: var(--cfdo-applied-text, #1e8e4a);
	font-weight: bold;
	font-size: 18px;
	margin-right: 8px;
}

.cfdo-text {
	color: var(--cfdo-applied-text, #1e6b3a);
	font-weight: 600;
}

.cfdo-offer-inner.cfdo-expired {
	background: #f3f3f3;
	border-color: #ccc;
	justify-content: flex-start;
	color: #666;
}

@keyframes cfdoPulse {
	0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.12); }
	70% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

@keyframes cfdoSlideIn {
	from { transform: translateY(30px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Style 1 — Classic Banner (default): full-width, headline+button in a row.
   ========================================================================== */

.cfdo-style1 .cfdo-offer-inner {
	justify-content: space-between;
	flex-wrap: wrap;
	animation: cfdoPulse 1.8s ease-in-out infinite;
}

.cfdo-style1 .cfdo-offer-inner.cfdo-applied,
.cfdo-style1 .cfdo-offer-inner.cfdo-expired {
	animation: none;
}

/* ==========================================================================
   Style 2 — Card: centered, stacked, larger padding, shadow, full-width button.
   ========================================================================== */

.cfdo-style2 .cfdo-offer-inner {
	flex-direction: column;
	align-items: stretch;
	text-align: center;
	max-width: 420px;
	margin: 0 auto;
	padding: 22px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	border-radius: 14px;
}

.cfdo-style2 .cfdo-copy {
	align-items: center;
	margin-bottom: 10px;
}

.cfdo-style2 .cfdo-button {
	width: 100%;
	padding: 12px 18px;
}

/* ==========================================================================
   Style 3 — Slide-In Corner: floating card, bottom-right, fixed position.
   ========================================================================== */

.cfdo-style3 {
	position: fixed;
	right: 20px;
	bottom: 20px;
	max-width: 320px;
	z-index: 9999;
	margin: 0;
}

.cfdo-style3 .cfdo-offer-inner {
	flex-direction: column;
	align-items: stretch;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	animation: cfdoSlideIn 0.35s ease-out;
	border-radius: 12px;
}

.cfdo-style3 .cfdo-button {
	width: 100%;
	margin-top: 8px;
}

@media (max-width: 600px) {
	.cfdo-style3 {
		right: 10px;
		left: 10px;
		bottom: 10px;
		max-width: none;
	}
}

/* ==========================================================================
   Style 4 — Sticky Bottom Bar: pinned across the full width of the viewport.
   ========================================================================== */

.cfdo-style4 {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	z-index: 9999;
}

.cfdo-style4 .cfdo-offer-inner {
	border-radius: 0;
	border-width: 1px 0 0 0;
	justify-content: space-between;
	flex-wrap: wrap;
	padding: 12px 20px;
	box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Style 5 — Compact Inline: minimal pill, small text, inline button.
   ========================================================================== */

.cfdo-style5 .cfdo-offer-inner {
	display: inline-flex;
	padding: 6px 14px;
	border-radius: 999px;
	gap: 10px;
}

.cfdo-style5 .cfdo-copy {
	flex-direction: row;
	align-items: center;
	gap: 8px;
}

.cfdo-style5 .cfdo-headline {
	font-size: 13px;
}

.cfdo-style5 .cfdo-subtext,
.cfdo-style5 .cfdo-countdown {
	display: none;
}

.cfdo-style5 .cfdo-button {
	padding: 5px 12px;
	font-size: 12px;
	border-radius: 999px;
}


/* ==========================================================================
   Item-level free-delivery progress message
   ========================================================================== */

.cfdo-item-progress {
	display: block;
	margin-top: 7px;
	padding: 7px 10px;
	border-left: 3px solid var(--cfdo-button-bg, #e0752c);
	background: var(--cfdo-bg, #fff7e6);
	color: var(--cfdo-text, #7a4a00);
	border-radius: 4px;
	font-size: 12px;
	line-height: 1.45;
	font-weight: 500;
}

.cfdo-item-progress .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--cfdo-text, #7a4a00);
}

@media (max-width: 600px) {
	.cfdo-item-progress {
		font-size: 11px;
		padding: 6px 8px;
	}
}
