/**
 * DispatchNow – WooCommerce Dispatch Cutoff Timer
 * Frontend styles — 4 visually distinct variants
 * Zero inline styles. All classes prefixed .dn-
 */

/* ============================================================
   BASE — shared foundation
   ============================================================ */

.dn-timer,
.dn-timer *,
.dn-timer *::before,
.dn-timer *::after {
	box-sizing: border-box;
}

.dn-timer {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	line-height: 1.4;
	margin: 14px 0;
	position: relative;
}

.dn-timer__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.dn-timer__text {
	font-size: 16px;
	font-weight: 500;
	color: #1a1a2e;
}

/* ============================================================
   STYLE 1 — MINIMAL
   Understated inline text. Maximum theme compatibility.
   Clock icon + clean readable text.
   ============================================================ */

.dn-timer--minimal {
	padding: 0;
	background: none;
	border: none;
	gap: 8px;
}

.dn-timer--minimal .dn-timer__icon {
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='8' stroke='%2322c55e' stroke-width='1.5'/%3E%3Cpath d='M10 6v4l2.5 2.5' stroke='%2322c55e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	display: inline-flex;
	flex-shrink: 0;
}

.dn-timer--minimal .dn-timer__text {
	font-size: 16px;
	font-weight: 500;
	color: #374151;
}

.dn-timer--minimal .dn-timer__countdown {
	font-weight: 700;
	color: #111827;
	font-variant-numeric: tabular-nums;
}

/* ============================================================
   STYLE 2 — BANNER
   Full-width dark bar. Bold countdown digits on dark bg.
   ============================================================ */

.dn-timer--banner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 15px 24px;
	background: #0f172a;
	border-radius: 8px;
	width: 100%;
}

.dn-timer--banner .dn-timer__icon {
	width: 20px;
	height: 20px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='8' stroke='%2322c55e' stroke-width='1.5'/%3E%3Cpath d='M10 6v4l2.5 2.5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

.dn-timer--banner .dn-timer__text {
	color: #94a3b8;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.01em;
}

.dn-timer--banner .dn-timer__countdown {
	color: #ffffff;
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.03em;
	background: rgba(255,255,255,0.1);
	padding: 3px 10px;
	border-radius: 5px;
}

/* ============================================================
   STYLE 3 — BADGE
   Compact pill — amber tones, truck icon, beside Add to Cart.
   ============================================================ */

.dn-timer--badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px 8px 12px;
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	border: 1px solid #fcd34d;
	border-radius: 999px;
	width: auto;
}

.dn-timer--badge .dn-timer__icon {
	width: 17px;
	height: 17px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M1 10h10V3H1v7zm0 0v4h2m8-4v4m0 0h2m-2 0a2 2 0 104 0m-4 0a2 2 0 100 0m-8 0a2 2 0 100 0m0 0a2 2 0 104 0' stroke='%23b45309' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11 6h4l3 4' stroke='%23b45309' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

.dn-timer--badge .dn-timer__text {
	font-size: 15px;
	font-weight: 600;
	color: #92400e;
	white-space: nowrap;
}

.dn-timer--badge .dn-timer__countdown {
	font-weight: 700;
	color: #78350f;
	font-variant-numeric: tabular-nums;
}

/* ============================================================
   STYLE 4 — BOXED
   Card with red left stripe. Most prominent, premium feel.
   ============================================================ */

.dn-timer--boxed {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #e94560;
	border-radius: 0 8px 8px 0;
	width: 100%;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dn-timer--boxed .dn-timer__icon {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%23e94560' stroke-width='1.5'/%3E%3Cpath d='M12 7v5l3 3' stroke='%23e94560' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

.dn-timer--boxed .dn-timer__text {
	font-size: 16px;
	font-weight: 500;
	color: #1e293b;
}

.dn-timer--boxed .dn-timer__countdown {
	font-size: 22px;
	font-weight: 700;
	color: #e94560;
	font-variant-numeric: tabular-nums;
	display: block;
	margin-top: 2px;
	letter-spacing: 0.5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media ( max-width: 480px ) {
	.dn-timer--banner {
		padding: 12px 16px;
		gap: 10px;
	}

	.dn-timer--banner .dn-timer__text {
		font-size: 14px;
	}

	.dn-timer--banner .dn-timer__countdown {
		font-size: 17px;
	}

	.dn-timer--boxed {
		padding: 14px 16px;
		gap: 12px;
	}

	.dn-timer--boxed .dn-timer__countdown {
		font-size: 19px;
	}

	.dn-timer--badge {
		padding: 7px 14px 7px 10px;
	}

	.dn-timer--badge .dn-timer__text {
		font-size: 13px;
	}
}

/* ============================================================
   SHOP / ARCHIVE — COMPACT DISPATCH LABEL
   One clean line below the price. No countdown.
   ============================================================ */

.dn-shop-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 6px 0 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
}

.dn-shop-label__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
	display: inline-block;
}

/* Today — green */
.dn-shop-label--today,
.dn-shop-label--today .dn-shop-label__text,
ul.products li.product .dn-shop-label--today,
ul.products li.product .dn-shop-label--today .dn-shop-label__text {
	color: #166534 !important;
}
.dn-shop-label--today .dn-shop-label__dot {
	background: #22C55E !important;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
	animation: dn-dot-pulse 2s ease-in-out infinite;
}

@keyframes dn-dot-pulse {
	0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
	50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.05); }
}

/* Future day — slate */
.dn-shop-label--future,
.dn-shop-label--future .dn-shop-label__text,
ul.products li.product .dn-shop-label--future,
ul.products li.product .dn-shop-label--future .dn-shop-label__text {
	color: #475569 !important;
}
.dn-shop-label--future .dn-shop-label__dot {
	background: #94A3B8 !important;
}

/* ============================================================
   AFTER CUTOFF STATE — .dn-timer--after-cutoff
   Applied by JS when the countdown reaches zero.
   Visually distinct from the live countdown state.
   ============================================================ */

/* Minimal — grey text when cutoff passed */
.dn-timer--minimal.dn-timer--after-cutoff .dn-timer__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='8' stroke='%2394a3b8' stroke-width='1.5'/%3E%3Cpath d='M10 6v4l2.5 2.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dn-timer--minimal.dn-timer--after-cutoff .dn-timer__text {
	color: #64748b;
}

/* Banner — dimmed when cutoff passed */
.dn-timer--banner.dn-timer--after-cutoff {
	background: #1e293b;
}
.dn-timer--banner.dn-timer--after-cutoff .dn-timer__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='8' stroke='%2394a3b8' stroke-width='1.5'/%3E%3Cpath d='M10 6v4l2.5 2.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dn-timer--banner.dn-timer--after-cutoff .dn-timer__text {
	color: #64748b;
}

/* Badge — slate tones when cutoff passed */
.dn-timer--badge.dn-timer--after-cutoff {
	background: #f8fafc;
	border-color: #cbd5e1;
}
.dn-timer--badge.dn-timer--after-cutoff .dn-timer__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M1 10h10V3H1v7zm0 0v4h2m8-4v4m0 0h2m-2 0a2 2 0 104 0m-4 0a2 2 0 100 0m-8 0a2 2 0 100 0m0 0a2 2 0 104 0' stroke='%2394a3b8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11 6h4l3 4' stroke='%2394a3b8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dn-timer--badge.dn-timer--after-cutoff .dn-timer__text {
	color: #475569;
}

/* Boxed — grey left stripe when cutoff passed */
.dn-timer--boxed.dn-timer--after-cutoff {
	border-left-color: #94a3b8;
	background: #f8fafc;
}
.dn-timer--boxed.dn-timer--after-cutoff .dn-timer__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%2394a3b8' stroke-width='1.5'/%3E%3Cpath d='M12 7v5l3 3' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dn-timer--boxed.dn-timer--after-cutoff .dn-timer__text {
	color: #475569;
}
