.pwjf-widget,
.pwjf-widget *,
.pwjf-widget *::before,
.pwjf-widget *::after {
	box-sizing: border-box;
}

.pwjf-widget {
	--pwjf-border: color-mix(in srgb, var(--pwjf-accent) 16%, transparent);
	font-family: inherit;
	color: var(--pwjf-text, #172033);
	direction: rtl;
}

.pwjf-countdown {
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 520px;
	margin: 14px 0 8px;
	padding: 14px;
	border: 1px solid var(--pwjf-border, #e8e2f7);
	border-radius: 16px;
	background:
		radial-gradient(circle at 0 0, color-mix(in srgb, var(--pwjf-accent) 12%, transparent), transparent 38%),
		var(--pwjf-surface, #fff);
	box-shadow: 0 10px 35px rgba(30, 25, 55, .07);
}

.pwjf-countdown::after {
	content: "";
	position: absolute;
	inset: auto -20% 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--pwjf-accent), transparent);
	opacity: .65;
}

.pwjf-countdown__heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 11px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
}

.pwjf-countdown__pulse {
	position: relative;
	display: inline-block;
	flex: 0 0 9px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--pwjf-urgent, #ef4444);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--pwjf-urgent) 45%, transparent);
	animation: pwjf-pulse 1.8s infinite;
}

.pwjf-countdown__units {
	display: grid;
	grid-template-columns: repeat(4, minmax(48px, 1fr));
	gap: 8px;
}

.pwjf-countdown__unit {
	display: flex;
	min-width: 0;
	min-height: 62px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 7px 4px;
	border: 1px solid color-mix(in srgb, var(--pwjf-accent) 11%, transparent);
	border-radius: 12px;
	background: color-mix(in srgb, var(--pwjf-accent) 5%, var(--pwjf-surface, #fff));
}

.pwjf-countdown__unit strong {
	font-size: clamp(18px, 3vw, 23px);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	letter-spacing: -.02em;
}

.pwjf-countdown__unit small {
	margin-top: 5px;
	font-size: 10px;
	line-height: 1;
	opacity: .65;
}

.pwjf-countdown__expired {
	margin: 0;
	text-align: center;
	font-weight: 700;
	color: var(--pwjf-urgent, #ef4444);
}

.pwjf-stock {
	width: 100%;
	max-width: 520px;
	margin: 10px 0 14px;
	padding: 12px 13px;
	border: 1px solid var(--pwjf-border, #e8e2f7);
	border-radius: 14px;
	background: color-mix(in srgb, var(--pwjf-accent) 3%, var(--pwjf-surface, #fff));
}

.pwjf-stock__label {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 9px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
}

.pwjf-stock__label svg {
	width: 17px;
	height: 17px;
	fill: var(--pwjf-accent, #7c3aed);
}

.pwjf-stock__track {
	position: relative;
	overflow: hidden;
	height: 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--pwjf-accent) 11%, #eef0f5);
}

.pwjf-stock__bar {
	display: block;
	height: 100%;
	min-width: 4%;
	border-radius: inherit;
	background: linear-gradient(90deg, color-mix(in srgb, var(--pwjf-accent) 72%, #fff), var(--pwjf-accent));
	box-shadow: 0 0 13px color-mix(in srgb, var(--pwjf-accent) 35%, transparent);
	transition: width .45s ease;
}

.pwjf-stock.is-low .pwjf-stock__label,
.pwjf-stock.is-low .pwjf-stock__label svg {
	color: var(--pwjf-urgent, #ef4444);
	fill: var(--pwjf-urgent, #ef4444);
}

.pwjf-stock.is-low .pwjf-stock__bar {
	background: linear-gradient(90deg, color-mix(in srgb, var(--pwjf-urgent) 70%, #fff), var(--pwjf-urgent));
	box-shadow: 0 0 13px color-mix(in srgb, var(--pwjf-urgent) 35%, transparent);
}

.pwjf-context-archive.pwjf-countdown {
	margin: 10px 0 4px;
	padding: 10px;
	border-radius: 13px;
	box-shadow: 0 6px 18px rgba(30, 25, 55, .05);
}

.pwjf-context-archive .pwjf-countdown__heading {
	margin-bottom: 8px;
	font-size: 11px;
}

.pwjf-context-archive .pwjf-countdown__units {
	gap: 5px;
}

.pwjf-context-archive .pwjf-countdown__unit {
	min-height: 48px;
	padding: 5px 2px;
	border-radius: 9px;
}

.pwjf-context-archive .pwjf-countdown__unit strong {
	font-size: 15px;
}

.pwjf-context-archive .pwjf-countdown__unit small {
	font-size: 8px;
}

.pwjf-context-archive.pwjf-stock {
	margin: 8px 0;
	padding: 9px 10px;
}

@keyframes pwjf-pulse {
	70% { box-shadow: 0 0 0 7px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

@media (max-width: 480px) {
	.pwjf-countdown { padding: 11px; border-radius: 14px; }
	.pwjf-countdown__units { gap: 5px; }
	.pwjf-countdown__unit { min-height: 54px; border-radius: 10px; }
	.pwjf-countdown__unit strong { font-size: 17px; }
	.pwjf-stock { padding: 11px; }
}

@media (prefers-reduced-motion: reduce) {
	.pwjf-countdown__pulse { animation: none; }
	.pwjf-stock__bar { transition: none; }
}

