// Questo file fa parte di MyTown.
// MyTown è software libero: puoi ridistribuirlo e/o modificarlo secondo
// i termini della GNU Affero General Public License come pubblicata dalla
// Free Software Foundation, versione 3.
// Distribuito senza ALCUNA GARANZIA; vedi la GNU AGPL v3 per i dettagli.
// Copyright (C) Kondor Consulting & Services S.r.l.
// SPDX-License-Identifier: AGPL-3.0-or-later

.step-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	gap: 0;
}

.step {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	background: var(--ion-color-light);
	color: var(--ion-color-medium);
	transition: all 0.3s;

	&.active {
		background: var(--ion-color-primary);
		color: white;
	}

	&.done {
		background: var(--ion-color-success);
		color: white;
	}
}

.step-line {
	flex: 1;
	height: 2px;
	max-width: 60px;
	background: var(--ion-color-light);
	transition: background 0.3s;

	&.active {
		background: var(--ion-color-primary);
	}
}

ion-card {
	border-radius: 12px;

	&.service-card-selected {
		--background: rgba(var(--ion-color-primary-rgb), 0.06);
		border: 2px solid var(--ion-color-primary);
	}
}

// Sticky footer - selezione servizi Step 1
.selection-footer {
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
}

.selection-footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom));
	background: var(--ion-background-color, #fff);
}

.selection-footer-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.selection-count {
	font-size: 15px;
	font-weight: 700;
	color: var(--ion-text-color);
}

.selection-duration {
	font-size: 13px;
	color: var(--ion-color-primary);
	font-weight: 600;
}

.selection-cta {
	flex-shrink: 0;
}

.selected-service-card {
	margin: 0 0 16px;

	ion-card-content {
		padding: 12px;
	}
}

// Day chips horizontal scroll
.day-chips-scroll {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;

	&::-webkit-scrollbar {
		display: none;
	}
}

.day-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 70px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--ion-color-light);
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;

	&.selected {
		background: var(--ion-color-primary);
		color: white;

		.day-chip-label,
		.day-chip-date {
			color: white;
		}
	}
}

.day-chip-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--ion-text-color);
}

.day-chip-date {
	font-size: 11px;
	color: var(--ion-color-medium);
	margin-top: 2px;
}

// Period toggle row (sotto "Ora", centrato)
.period-toggle-row {
	display: flex;
	justify-content: center;
	gap: 0;
	background: var(--ion-color-light);
	border-radius: 20px;
	padding: 2px;
	margin-bottom: 12px;
}

.period-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	border-radius: 18px;
	font-size: 12px;
	font-weight: 500;
	color: var(--ion-color-medium);
	cursor: pointer;
	transition: all 0.2s;

	ion-icon {
		font-size: 14px;
	}

	&.active {
		background: var(--ion-color-primary);
		color: white;
	}
}

// Time chips horizontal scroll
.time-chips-scroll {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;

	&::-webkit-scrollbar {
		display: none;
	}
}

.time-chip {
	padding: 10px 18px;
	border-radius: 20px;
	background: var(--ion-color-light);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
	white-space: nowrap;

	&.selected {
		background: var(--ion-color-primary);
		color: white;
	}
}

.time-separator {
	width: 2px;
	background: var(--ion-color-light-shade);
	flex-shrink: 0;
	margin: 4px 4px;
	border-radius: 1px;
}
