/* Rejuven8 — Same-Day Shipping Cutoff widget
 * Theme via CSS vars on .r8c (Elementor style controls write these). */

.r8c {
	--r8c-bg: #0a0d18;
	--r8c-bg2: #0f1730;
	--r8c-text: rgba(255,255,255,0.88);
	--r8c-muted: rgba(255,255,255,0.55);
	--r8c-accent: #2b5cff;
	--r8c-accent-rgb: 43,92,255;
	--r8c-warn: #ffb02e;
	--r8c-warn-rgb: 255,176,46;
	--r8c-radius: 8px;
	--r8c-radius-inner: 6px;
	--r8c-font: 13px;

	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--r8c-text);
	font-size: var(--r8c-font);
	line-height: 1.2;
	letter-spacing: 0.01em;
	box-sizing: border-box;
}
.r8c *, .r8c *::before, .r8c *::after { box-sizing: border-box; }

/* ── Icon ────────────────────────────────────────────────────────────── */
.r8c__icon {
	display: inline-flex;
	width: 16px; height: 16px;
	color: var(--r8c-accent);
	filter: drop-shadow(0 0 3px rgba(var(--r8c-accent-rgb), 0.45));
	flex-shrink: 0;
}
.r8c__icon svg { width: 100%; height: 100%; }

/* ── Timer ───────────────────────────────────────────────────────────── */
.r8c__timer {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #fff;
	white-space: nowrap;
}

/* ── Pill (desktop header) ───────────────────────────────────────────── */
.r8c--pill {
	padding: 6px 6px 6px 12px;
	border-radius: var(--r8c-radius);
	background: linear-gradient(90deg, var(--r8c-bg), var(--r8c-bg2));
	border: 1px solid rgba(var(--r8c-accent-rgb), 0.28);
	box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.25);
	white-space: nowrap;
}
.r8c--pill .r8c__label { font-weight: 500; }
.r8c__timer--pill {
	padding: 5px 10px;
	border-radius: var(--r8c-radius-inner);
	background: #000;
	font-size: 0.95em;
	box-shadow: inset 0 0 0 1px rgba(var(--r8c-accent-rgb), 0.35);
}
.r8c--pill .r8c__more {
	margin-left: 2px;
	width: 26px; height: 26px;
	padding: 0;
}
.r8c--pill .r8c__more-txt { display: none; }

/* ── Strip (mobile / cart / checkout) ────────────────────────────────── */
.r8c--strip {
	display: flex;
	width: 100%;
	justify-content: center;
	padding: 8px 12px;
	background: linear-gradient(90deg, var(--r8c-bg) 0%, var(--r8c-bg2) 50%, var(--r8c-bg) 100%);
	border-bottom: 1px solid rgba(var(--r8c-accent-rgb), 0.22);
	text-align: center;
	flex-wrap: nowrap;
}
.r8c--strip .r8c__msg { flex: 0 1 auto; min-width: 0; }
.r8c--strip .r8c__timer {
	display: inline-block;
	padding: 1px 7px;
	margin: 0 2px;
	border-radius: var(--r8c-radius-inner);
	background: rgba(0,0,0,0.55);
	box-shadow: inset 0 0 0 1px rgba(var(--r8c-accent-rgb), 0.35);
}

/* Inline variant for cart/checkout: card-like, rounded, spaced. */
.r8c--inline {
	margin: 0 0 18px;
	border-radius: var(--r8c-radius);
	border: 1px solid rgba(var(--r8c-accent-rgb), 0.25);
}

/* ── Details button + popover ────────────────────────────────────────── */
.r8c__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 4px 9px;
	border-radius: var(--r8c-radius-inner);
	border: 1px solid rgba(var(--r8c-accent-rgb), 0.45);
	background: rgba(var(--r8c-accent-rgb), 0.10);
	color: var(--r8c-text);
	font: inherit;
	font-size: 0.9em;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
	flex-shrink: 0;
}
.r8c__more svg { width: 14px; height: 14px; }
.r8c__more[aria-expanded="true"] {
	background: rgba(var(--r8c-accent-rgb), 0.28);
	border-color: rgba(var(--r8c-accent-rgb), 0.8);
	color: #fff;
}
@media (hover: hover) {
	.r8c__more:hover {
		background: rgba(var(--r8c-accent-rgb), 0.22);
		border-color: rgba(var(--r8c-accent-rgb), 0.7);
		color: #fff;
	}
}

.r8c__pop {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 1001;
	width: min(340px, calc(100vw - 24px));
	padding: 14px 16px 12px;
	border-radius: 12px;
	background: #0b0f1d;
	border: 1px solid rgba(var(--r8c-accent-rgb), 0.35);
	box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.4);
	color: var(--r8c-text);
	text-align: left;
	font-size: 13px;
	white-space: normal;
	animation: r8c-pop .18s ease-out;
}
.r8c--strip .r8c__pop { right: auto; left: 50%; transform: translateX(-50%); }
@keyframes r8c-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.r8c--strip .r8c__pop { animation: none; }

.r8c__pop-head {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: 8px;
	font-size: 14px;
}
.r8c__pop-close {
	display: inline-flex; padding: 3px;
	border: 0; background: none; color: var(--r8c-muted); cursor: pointer;
}
.r8c__pop-close:hover { color: #fff; }
.r8c__pop-close svg { width: 16px; height: 16px; }
.r8c__pop-status {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(var(--r8c-accent-rgb), 0.12);
	border-left: 3px solid var(--r8c-accent);
}
.r8c__pop-list { list-style: none; margin: 0 0 10px; padding: 0; }
.r8c__pop-list li {
	padding: 6px 0;
	border-bottom: 1px solid rgba(255,255,255,0.07);
}
.r8c__pop-list li:last-child { border-bottom: 0; }
.r8c__pop-fine { margin: 0; color: var(--r8c-muted); font-size: 11.5px; line-height: 1.45; }

/* ── State theming ───────────────────────────────────────────────────── */
.r8c--closing { --r8c-accent: var(--r8c-warn); --r8c-accent-rgb: var(--r8c-warn-rgb); }
.r8c--closing .r8c__timer { animation: r8c-pulse 1.2s ease-in-out infinite; }
@keyframes r8c-pulse { 0%,100% { box-shadow: inset 0 0 0 1px rgba(var(--r8c-accent-rgb), 0.35); } 50% { box-shadow: inset 0 0 0 1px rgba(var(--r8c-accent-rgb), 0.9), 0 0 10px rgba(var(--r8c-accent-rgb), 0.35); } }

.r8c--closed_today, .r8c--closed_nonship, .r8c--holiday, .r8c--paused {
	--r8c-accent: #8a94b8; --r8c-accent-rgb: 138,148,184;
}
.r8c--backorder { --r8c-accent: #ff6b6b; --r8c-accent-rgb: 255,107,107; }

.r8c--loading .r8c__timer { opacity: 0.4; }

/* ── Screen-reader only ──────────────────────────────────────────────── */
.r8c__sr {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.r8c__pop, .r8c--closing .r8c__timer { animation: none; }
}

@media (max-width: 767px) {
	.r8c { --r8c-font: 12.5px; }
	.r8c--strip { padding: 7px 10px; gap: 8px; }
	.r8c--strip .r8c__more { width: 26px; height: 26px; padding: 0; }
	.r8c--strip .r8c__more-txt { display: none; }
}
