/**
 * Styles for aligner change timeline.
 */

.awc-timeline {
	width: 100%;
	padding: 1.5rem 0;
	font-family: "Montserrat",sans-serif;
}

.awc-timeline__container {
	position: relative;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
	padding: 0 1rem;
}

.awc-timeline__container::-webkit-scrollbar {
	height: 6px;
}

.awc-timeline__container::-webkit-scrollbar-track {
	background: transparent;
}

.awc-timeline__container::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 3px;
}

.awc-timeline__container::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

.awc-timeline__track {
	display: flex;
	align-items: flex-start;
	gap: 0;
	min-width: max-content;
	padding: 1rem 0 2rem;
	position: relative;
}

/* Timeline Item */
.awc-timeline__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	flex-shrink: 0;
	min-width: 120px;
	padding: 0 1.5rem;
}

/* Marker (dot) */
.awc-timeline__marker {
	position: relative;
	z-index: 2;
	margin-bottom: 0.75rem;
}

.awc-timeline__marker-inner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #e5e7eb;
	border: 3px solid #ffffff;
	box-shadow: 0 0 0 2px #e5e7eb;
	transition: all 0.3s ease;
}

.awc-timeline__marker-inner--active {
	background: var(--ast-global-color-0, #2563eb);
	box-shadow: 0 0 0 2px var(--ast-global-color-0, #2563eb), 0 0 0 6px rgba(37, 99, 235, 0.15);
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		box-shadow: 0 0 0 2px var(--ast-global-color-0, #2563eb), 0 0 0 6px rgba(37, 99, 235, 0.15);
	}
	50% {
		box-shadow: 0 0 0 2px var(--ast-global-color-0, #2563eb), 0 0 0 10px rgba(37, 99, 235, 0.1);
	}
}

/* Past items */
.awc-timeline__item--past .awc-timeline__marker-inner {
	background: #0000004D;
	border-color: #0000004D;
	box-shadow: 0 0 0 2px #0000004D;
}

/* Future items */
.awc-timeline__item--future .awc-timeline__marker-inner {
	background: #e5e7eb;
}

/* Connector line */
.awc-timeline__connector {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: calc(50% + 75px);
	right: calc(-50% + 75px);
	height: auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	z-index: 1;
	pointer-events: none;
}

.awc-timeline__arrow {
	font-size: 1.125rem;
	font-weight: 700;
	color: #cbd5e1;
	line-height: 1;
	margin-left: auto;
	background: transparent;
	padding: 0;
	position: relative;
	z-index: 2;
}

/* Past to past connectors */
.awc-timeline__item--past + .awc-timeline__item--past .awc-timeline__arrow {
	color: #0000004D;
}

/* Past to current connector */
.awc-timeline__item--past + .awc-timeline__item--current .awc-timeline__arrow {
	color: #0000004D;
}

/* Current to future connectors */
.awc-timeline__item--current + .awc-timeline__item--future .awc-timeline__arrow,
.awc-timeline__item--future + .awc-timeline__item--future .awc-timeline__arrow {
	color: #cbd5e1;
}

/* Content */
.awc-timeline__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	text-align: center;
}

.awc-timeline__step {
	font-size: 0.75rem;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.awc-timeline__item--current .awc-timeline__step {
	color: var(--ast-global-color-0, #2563eb);
}

.awc-timeline__item--past .awc-timeline__step {
	color: #0000004D;
}

.awc-timeline__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.125rem;
}

.awc-timeline__date-day {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1f2933;
	line-height: 1;
}

.awc-timeline__date-month {
	font-size: 0.75rem;
	font-weight: 500;
	color: #6b7280;
	text-transform: capitalize;
}

.awc-timeline__date--today {
	font-size: 0.875rem;
	font-weight: 600;
	color: #2563eb;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.awc-timeline__item--past .awc-timeline__date-day,
.awc-timeline__item--past .awc-timeline__date-month {
	color: #0000004D;
}

.awc-timeline__item--current .awc-timeline__date-day {
	color: var(--ast-global-color-0, #2563eb);
	font-size: 1.75rem;
}

.awc-timeline__item--current .awc-timeline__date-month {
	color: var(--ast-global-color-0, #2563eb);
	font-weight: 600;
}

.awc-timeline__date--today {
	color: var(--ast-global-color-0, #2563eb);
}

/* Error and empty states */
.awc-timeline--error,
.awc-timeline--empty {
	padding: 2rem 1rem;
	color: #6b7280;
	font-size: 0.875rem;
	text-align: center;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

.awc-timeline--error {
	color: #dc2626;
	border-color: #fecaca;
	background: #fef2f2;
}

/* Mobile optimizations */
@media (max-width: 768px) {
	.awc-timeline {
		padding: 1rem 0;
	}

	.awc-timeline__container {
		padding: 0 0.5rem;
	}

	.awc-timeline__track {
		padding: 0.75rem 0 1.5rem;
	}

	.awc-timeline__item {
		min-width: 100px;
		padding: 0 0.75rem;
	}

	.awc-timeline__marker-inner {
		width: 14px;
		height: 14px;
		border-width: 2px;
	}

	.awc-timeline__marker-inner--active {
		box-shadow: 0 0 0 2px #2563eb, 0 0 0 5px rgba(37, 99, 235, 0.15);
	}

	.awc-timeline__connector {
		top: 50%;
		transform: translateY(-50%);
		left: calc(50% + 50px);
		right: calc(-50% + 50px);
	}

	.awc-timeline__arrow {
		font-size: 1rem;
	}

	.awc-timeline__date-day {
		font-size: 1.25rem;
	}

	.awc-timeline__item--current .awc-timeline__date-day {
		font-size: 1.5rem;
	}

	.awc-timeline__date-month {
		font-size: 0.7rem;
	}

	.awc-timeline__step {
		font-size: 0.7rem;
	}

	.awc-timeline__date--today {
		font-size: 0.8rem;
	}
}

@media (max-width: 480px) {
	.awc-timeline__item {
		min-width: 90px;
		padding: 0 0.5rem;
	}

	.awc-timeline__date-day {
		font-size: 1.125rem;
	}

	.awc-timeline__item--current .awc-timeline__date-day {
		font-size: 1.375rem;
	}

	.awc-timeline__connector {
		top: 50%;
		transform: translateY(-50%);
		left: calc(50% + 45px);
		right: calc(-50% + 45px);
	}

	.awc-timeline__arrow {
		font-size: 0.9rem;
	}
}

/* Smooth scroll hint on mobile */
@media (max-width: 768px) {
	.awc-timeline__container {
		scroll-snap-type: x mandatory;
	}

	.awc-timeline__item {
		scroll-snap-align: start;
	}
}

/* Hide scrollbar on some mobile browsers */
@supports (-webkit-overflow-scrolling: touch) {
	.awc-timeline__container {
		-webkit-overflow-scrolling: touch;
	}
}
