/* Waiting timeline — 10-minute countdown UX */

.ms-wait-timeline {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	padding: 0.35rem 0.5rem 0.5rem;
	text-align: center;
}

.ms-wait-timeline__ring-wrap {
	position: relative;
	width: 7.5rem;
	height: 7.5rem;
}

.ms-wait-timeline__ring {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ms-wait-timeline__ring-track {
	fill: none;
	stroke: rgba(37, 99, 235, 0.12);
	stroke-width: 8;
}

.ms-wait-timeline__ring-progress {
	fill: none;
	stroke: var(--ms-color-primary, #2563eb);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.85s ease;
}

.ms-wait-timeline__ring-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;
}

.ms-wait-timeline__clock {
	font-size: clamp(1.35rem, 5vw, 1.65rem);
	font-weight: 800;
	color: var(--ms-color-primary, #2563eb);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	direction: ltr;
}

.ms-wait-timeline__clock-label {
	font-size: var(--ms-text-xs, 0.75rem);
	color: var(--ms-color-text-muted, #64748b);
	font-weight: 600;
}

.ms-wait-timeline__headline {
	margin: 0;
	font-size: clamp(1rem, 3.5vw, 1.125rem);
	font-weight: 800;
	color: var(--ms-color-text, #0f172a);
	line-height: 1.55;
	max-width: 22rem;
}

.ms-wait-timeline__title {
	margin: 0;
	font-size: var(--ms-text-sm, 0.875rem);
	font-weight: 700;
	color: var(--ms-color-text-muted, #64748b);
}

.ms-wait-timeline__desc {
	margin: 0;
	font-size: var(--ms-text-sm, 0.875rem);
	color: var(--ms-color-text-muted, #64748b);
	line-height: 1.7;
	max-width: 24rem;
}

.ms-wait-timeline__track {
	width: min(100%, 20rem);
	height: 6px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.1);
	overflow: hidden;
}

.ms-wait-timeline__track-fill {
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--ms-color-primary, #2563eb), #f97316);
	transition: width 0.85s ease;
}

.ms-wait-timeline__steps {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	width: min(100%, 24rem);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.35rem;
	position: relative;
}

.ms-wait-timeline__steps::before {
	content: '';
	position: absolute;
	top: 1.05rem;
	right: 12%;
	left: 12%;
	height: 2px;
	background: rgba(148, 163, 184, 0.35);
	z-index: 0;
}

.ms-wait-timeline__step {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	min-width: 0;
}

.ms-wait-timeline__step-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	font-size: 0.8rem;
	font-weight: 800;
	background: #fff;
	border: 2px solid rgba(148, 163, 184, 0.45);
	color: var(--ms-color-text-muted, #64748b);
	transition: border-color 0.35s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.ms-wait-timeline__step-label {
	font-size: 0.68rem;
	line-height: 1.35;
	font-weight: 600;
	color: var(--ms-color-text-muted, #64748b);
}

.ms-wait-timeline__step.is-done .ms-wait-timeline__step-dot {
	background: var(--ms-color-primary, #2563eb);
	border-color: var(--ms-color-primary, #2563eb);
	color: #fff;
}

.ms-wait-timeline__step.is-done .ms-wait-timeline__step-label {
	color: var(--ms-color-text, #0f172a);
}

.ms-wait-timeline__step.is-active .ms-wait-timeline__step-dot {
	border-color: #f97316;
	color: #f97316;
	box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
	animation: ms-wait-step-pulse 1.6s ease-in-out infinite;
}

.ms-wait-timeline__step.is-active .ms-wait-timeline__step-label {
	color: var(--ms-color-text, #0f172a);
	font-weight: 800;
}

.ms-wait-timeline__step.is-pending .ms-wait-timeline__step-dot {
	opacity: 0.75;
}

@keyframes ms-wait-step-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.06); }
}

.ms-wait-timeline--off-hours .ms-wait-timeline__off-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(99, 102, 241, 0.18));
	color: var(--ms-color-primary, #2563eb);
}

.ms-wait-timeline--off-hours .ms-wait-timeline__off-icon svg {
	width: 2rem;
	height: 2rem;
}

.ms-wait-timeline--off-hours .ms-wait-timeline__headline {
	max-width: 26rem;
}

@media (max-width: 480px) {
	.ms-wait-timeline__step-label {
		font-size: 0.62rem;
	}

	.ms-wait-timeline__step-dot {
		width: 1.75rem;
		height: 1.75rem;
		font-size: 0.72rem;
	}
}
