/**
 * Pattern — Draw Chip
 *
 * Markup: modules/frontend/views/patterns/draw-chip.php. The configured
 * draw type, date and time, shared by the Competition Card and the
 * Competition Page (extracted from competition-card.css, 2026-10-02 —
 * values unchanged). A Live Draw's dot has a slow expanding ring, the
 * chip's only motion, off under prefers-reduced-motion.
 */

.ec-draw-chip {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	align-self: flex-start;
	gap: 0.15rem var(--ec-space-2);
	margin: 0;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--ec-color-border-strong);
	border-radius: var(--ec-radius-full);
	font-size: 0.75rem;
	line-height: 1.2;
	color: var(--ec-color-text-secondary);
}

.ec-draw-chip__type {
	font-weight: var(--ec-font-weight-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ec-color-text-primary);
}

.ec-draw-chip__when::before {
	content: '·';
	margin-right: var(--ec-space-2);
	color: var(--ec-color-text-tertiary);
}

.ec-draw-chip__dot {
	position: relative;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--ec-radius-full);
	background-color: var(--ec-color-accent);
	box-shadow: 0 0 8px rgba(44, 213, 227, 0.6);
}

.ec-draw-chip--live .ec-draw-chip__dot {
	background-color: var(--ec-color-fire-500);
	box-shadow: 0 0 8px rgba(226, 113, 47, 0.7);
}

/* Live indicator — a slow expanding ring, the chip's only idle motion */
.ec-draw-chip--live .ec-draw-chip__dot::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 1px solid var(--ec-color-fire-500);
	animation: ec-draw-chip-live-pulse 2.2s var(--ec-ease-standard) infinite;
}

@keyframes ec-draw-chip-live-pulse {
	0% {
		transform: scale(1);
		opacity: 0.9;
	}

	100% {
		transform: scale(2.6);
		opacity: 0;
	}
}

/* Auto Draw and Instant Win — teal, with the same expanding beacon ring as Live Draw. 12 Oct 2026 gave the
   ring to Instant Win only; Auto Draw chips (`--auto`, the type every Auto Draw card renders) were left as a
   static dot (fixed 17 Oct 2026). Only the colour differs from Live Draw. */
.ec-draw-chip--auto .ec-draw-chip__dot,
.ec-draw-chip--instant .ec-draw-chip__dot {
	background-color: var(--ec-color-accent);
	box-shadow: 0 0 8px rgba(44, 213, 227, 0.7);
}

.ec-draw-chip--auto .ec-draw-chip__dot::after,
.ec-draw-chip--instant .ec-draw-chip__dot::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 1px solid var(--ec-color-accent);
	animation: ec-draw-chip-live-pulse 2.2s var(--ec-ease-standard) infinite;
}

@media (prefers-reduced-motion: reduce) {
	.ec-draw-chip--live .ec-draw-chip__dot::after,
	.ec-draw-chip--auto .ec-draw-chip__dot::after,
	.ec-draw-chip--instant .ec-draw-chip__dot::after {
		animation: none;
	}
}
