/*!
 * Sentio for Elementor - wc-sale-countdown widget
 * Extracted from frontend.css during WC Batch 1 sub-batch 2 mechanical extraction (2026-04-20).
 * Tier 3 mechanical extraction — body verbatim from monolith (WC-09 section).
 */

/* ── WC-09  Sale Countdown ────────────────────────────────────────── */

.sentio-cd {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.sentio-cd__timer {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Boxed style */
.sentio-cd--boxed .sentio-cd__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #f5f5f5;
	border-radius: 8px;
	padding: 12px 16px;
	min-width: 70px;
}

.sentio-cd--boxed .sentio-cd__digit {
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
	color: #333;
}

.sentio-cd--boxed .sentio-cd__label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #888;
	margin-top: 4px;
}

.sentio-cd__sep {
	font-size: 24px;
	font-weight: 700;
	color: #ccc;
	line-height: 1;
	align-self: flex-start;
	padding-top: 12px;
}

/* Inline style */
.sentio-cd--inline .sentio-cd__timer {
	gap: 4px;
}

.sentio-cd--inline .sentio-cd__unit {
	display: inline-flex;
	align-items: baseline;
	gap: 3px;
}

.sentio-cd--inline .sentio-cd__digit {
	font-size: 22px;
	font-weight: 700;
	color: #333;
}

.sentio-cd--inline .sentio-cd__label {
	font-size: 13px;
	color: #666;
}

/* Circle style */
.sentio-cd--circle .sentio-cd__unit {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
}

.sentio-cd--circle .sentio-cd__ring {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.sentio-cd--circle .sentio-cd__ring-bg {
	fill: none;
	stroke: #eee;
	stroke-width: 3;
}

.sentio-cd--circle .sentio-cd__ring-fg {
	fill: none;
	stroke: #333;
	stroke-width: 3;
	stroke-linecap: round;
	transform: rotate(-90deg);
	transform-origin: center;
	transition: stroke-dashoffset 1s linear;
}

.sentio-cd--circle .sentio-cd__digit {
	font-size: 24px;
	font-weight: 700;
	color: #333;
	line-height: 1;
	position: relative;
	z-index: 1;
}

.sentio-cd--circle .sentio-cd__label {
	font-size: 10px;
	text-transform: uppercase;
	color: #888;
	position: relative;
	z-index: 1;
}

/* Flip style */
.sentio-cd--flip .sentio-cd__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.sentio-cd--flip .sentio-cd__flip-card {
	position: relative;
	width: 56px;
	height: 64px;
	perspective: 300px;
}

.sentio-cd--flip .sentio-cd__flip-top,
.sentio-cd--flip .sentio-cd__flip-bottom {
	position: absolute;
	left: 0;
	right: 0;
	height: 50%;
	overflow: hidden;
	background: #333;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sentio-cd--flip .sentio-cd__flip-top {
	top: 0;
	border-radius: 6px 6px 0 0;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	align-items: flex-end;
}

.sentio-cd--flip .sentio-cd__flip-bottom {
	bottom: 0;
	border-radius: 0 0 6px 6px;
	align-items: flex-start;
}

.sentio-cd--flip .sentio-cd__flip-top span,
.sentio-cd--flip .sentio-cd__flip-bottom span {
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	line-height: 64px;
}

.sentio-cd--flip .sentio-cd__flip-top span {
	transform: translateY(50%);
}

.sentio-cd--flip .sentio-cd__flip-bottom span {
	transform: translateY(-50%);
}

.sentio-cd--flip .sentio-cd__label {
	font-size: 10px;
	text-transform: uppercase;
	color: #888;
}

/* Urgency color transitions */
.sentio-cd--urgent .sentio-cd__digit {
	color: #e53935;
	animation: sentio-cd-pulse 1s ease-in-out infinite;
}

.sentio-cd--urgent.sentio-cd--boxed .sentio-cd__unit {
	background: #fde8e8;
}

@keyframes sentio-cd-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

/* Separator styles */
.sentio-cd__sep--colon::after { content: ':'; }
.sentio-cd__sep--dash::after { content: '-'; }
.sentio-cd__sep--dot::after { content: '·'; }

/* Product info row */
.sentio-cd__product {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: #f9f9f9;
	border-radius: 8px;
	width: 100%;
	max-width: 400px;
}

.sentio-cd__product-thumb {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.sentio-cd__product-info {
	flex: 1;
	min-width: 0;
}

.sentio-cd__product-title {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sentio-cd__product-price {
	font-size: 13px;
	color: #e53935;
	font-weight: 600;
}

/* Expired state */
.sentio-cd--expired .sentio-cd__timer {
	opacity: 0.4;
}

/* Renamed from .sentio-cd__expired-msg: the expire message is now the
   server-rendered .sentio-cd__expire-msg node that PHP always outputs and the
   expiry handler unhides, so the old JS-injected class no longer exists.
   Defaults kept identical; the Message style controls override them. */
.sentio-cd__expire-msg {
	font-size: 14px;
	color: #e53935;
	font-weight: 500;
	text-align: center;
}


/* ── Responsive ── */
/* Mobile shrink for boxed + circle layouts. Moved from wc-product-search.css
 * @media block (where it was accidentally co-located) during the CSS
 * cross-contamination rescue (2026-04-20). */
@media (max-width: 767px) {
	.sentio-cd--boxed .sentio-cd__unit {
		min-width: 56px;
		padding: 8px 10px;
	}
	.sentio-cd--boxed .sentio-cd__digit {
		font-size: 24px;
	}
	.sentio-cd--circle .sentio-cd__unit {
		width: 64px;
		height: 64px;
	}
	.sentio-cd--circle .sentio-cd__digit {
		font-size: 20px;
	}
}

/* ── Message (pre-expiry) + Expire message ──────────────────────────
   Both are styled by the same "Message" style-tab controls. The swap is
   driven entirely by .sentio-cd--expired, which the countdown's existing
   expiry handler already applies — no separate timer or state. */
.sentio-cd__message {
	margin: 0 0 12px;
	line-height: 1.5;
}

.sentio-cd__expire-msg {
	margin: 12px 0 0;
	line-height: 1.5;
}

.sentio-cd__expire-msg[hidden] {
	display: none;
}

/* The moment the timer hits zero the pre-expiry message gives way. */
.sentio-cd--expired .sentio-cd__message {
	display: none;
}
