// 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

.footer{
    margin-bottom: 15px;
    display: flex;
    justify-content: end;
    padding-right: 15px;
}

// ── Checkout step action buttons (allineati a Prenotazioni) ──
.step-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	margin-top: 20px;

	ion-button {
		margin: 0;
	}
}
// ── Step indicator ────────────────────────────────────────
.step-indicator {
	display: flex;
	align-items: center;
	padding: 12px 20px 8px;
	background: var(--ion-background-color, #fff);
	border-bottom: 1px solid var(--ion-color-light-shade);
}

.step-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: default;
	min-width: 52px;

	&.done { cursor: pointer; }
}

.step-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid var(--ion-color-light-shade);
	background: var(--ion-item-background, #fff);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--ion-color-medium);
	transition: background 0.2s, border-color 0.2s;

	.step-item.active & {
		border-color: var(--ion-color-primary);
		background: var(--ion-color-primary);
		color: #fff;
	}

	.step-item.done & {
		border-color: var(--ion-color-success);
		background: var(--ion-color-success);
		color: #fff;
	}
}

.step-label {
	font-size: 10px;
	margin-top: 4px;
	color: var(--ion-color-medium);
	text-align: center;
	white-space: nowrap;

	.step-item.active & { color: var(--ion-color-primary); font-weight: 600; }
	.step-item.done &   { color: var(--ion-color-success); }
}

.step-line {
	flex: 1;
	height: 2px;
	background: var(--ion-color-light-shade);
	margin: 0 4px 18px;

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

// ── Selezione metodo (allineata al checkout Prenotazioni) ──
.method-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ion-color-medium-shade);
	margin: 16px 0 8px;
}

.method-buttons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
	gap: 10px;
	margin-bottom: 4px;
}

.method-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 14px 8px;
	border: 2px solid var(--ion-color-light-shade, #d7d8da);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.05s;
	position: relative;

	ion-icon {
		font-size: 26px;
		color: var(--ion-color-medium, #92949c);
		transition: color 0.15s;
	}

	span {
		font-size: 12px;
		font-weight: 600;
		color: var(--ion-color-dark, #222428);
		transition: color 0.15s;
		text-align: center;
	}

	&:active {
		transform: scale(0.97);
	}

	&.selected {
		border-color: var(--ion-color-primary, #3880ff);
		background: rgba(56, 128, 255, 0.10);
		box-shadow: 0 2px 6px rgba(56, 128, 255, 0.20);

		ion-icon { color: var(--ion-color-primary, #3880ff); }
		span     { color: var(--ion-color-primary, #3880ff); font-weight: 700; }

		&::after {
			content: '\2713';
			position: absolute;
			top: 4px;
			right: 6px;
			font-size: 12px;
			font-weight: 700;
			color: var(--ion-color-primary, #3880ff);
			width: 16px;
			height: 16px;
			line-height: 16px;
			text-align: center;
		}
	}
}

// Pulsante elimina dentro la card indirizzo
.method-btn .card-del {
	margin: 0;
	height: 22px;
	--padding-start: 4px;
	--padding-end: 4px;
	ion-icon { font-size: 18px; }
}

// Logo corriere dentro la card metodo
.method-btn .courier-logo {
	width: 26px;
	height: 26px;
	object-fit: contain;
}

// Container dei bottoni nativi PayPal nel riepilogo
.paypal-container {
	min-height: 48px;
	margin-top: 4px;
}

// ── Riepilogo importo (allineato al checkout Prenotazioni) ──
.checkout-amount-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--ion-color-light, #f5f5f5);
	border-radius: 10px;
	padding: 14px 16px;
	margin: 16px 0;
	font-size: 14px;

	strong {
		font-size: 22px;
		color: var(--ion-color-success);
	}
}
