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

.asm-content {
	--background: #f4f6f9;
}

/* ── Hero ─────────────────────────────────────────────── */
.asm-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 16px 14px;
	background: linear-gradient(135deg, var(--ion-color-primary) 0%, #0a5a92 100%);
	color: #fff;
	border-bottom-left-radius: 22px;
	border-bottom-right-radius: 22px;

	.asm-hero-txt h1 {
		margin: 0;
		font-size: 1.5rem;
		font-weight: 800;
		letter-spacing: -0.4px;
	}
	.asm-hero-txt p {
		margin: 2px 0 0;
		opacity: 0.85;
		font-size: 0.82rem;
	}
	.asm-cal-btn {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		background: rgba(255, 255, 255, 0.18);
		color: #fff;
		border: none;
		border-radius: 999px;
		padding: 8px 14px;
		font-size: 0.82rem;
		font-weight: 600;
		backdrop-filter: blur(4px);
		ion-icon {
			font-size: 1.05rem;
		}
	}
}

/* ── Segment ──────────────────────────────────────────── */
.asm-seg {
	padding: 14px 12px 4px;
	ion-segment {
		--background: #e7ebf2;
		border-radius: 12px;
	}
	ion-segment-button {
		--indicator-color: #fff;
		--color: var(--ion-color-medium);
		--color-checked: var(--ion-color-primary);
		--border-radius: 10px;
		min-height: 34px;
		font-weight: 600;
		font-size: 0.8rem;
		text-transform: none;
	}
}

/* ── Search ───────────────────────────────────────────── */
.asm-search {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 14px 4px;
	padding: 0 12px;
	height: 42px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 4px rgba(20, 40, 70, 0.06);
	ion-icon {
		color: var(--ion-color-medium);
		font-size: 1.1rem;
	}
	input {
		flex: 1;
		border: none;
		outline: none;
		background: transparent;
		font-size: 0.9rem;
	}
	ion-icon[name='close-circle'] {
		cursor: pointer;
	}
}

/* ── List ─────────────────────────────────────────────── */
.asm-list {
	padding: 10px 14px 90px;
}

.asm-card {
	position: relative;
	display: flex;
	align-items: stretch;
	background: #fff;
	border-radius: 16px;
	margin-bottom: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(20, 40, 70, 0.07);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	&:active {
		transform: scale(0.985);
		box-shadow: 0 1px 6px rgba(20, 40, 70, 0.1);
	}

	.asm-card-accent {
		width: 5px;
		flex: 0 0 5px;
		&.accent-warning { background: var(--ion-color-warning); }
		&.accent-success { background: var(--ion-color-success); }
		&.accent-danger { background: var(--ion-color-danger); }
		&.accent-medium { background: var(--ion-color-medium); }
	}

	.asm-card-body {
		flex: 1;
		padding: 12px 6px 12px 14px;
		min-width: 0;
	}

	.asm-card-top {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 6px;
		ion-badge {
			font-size: 0.66rem;
			font-weight: 700;
			border-radius: 6px;
			text-transform: uppercase;
			letter-spacing: 0.3px;
		}
	}

	.asm-chip {
		font-size: 0.64rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.4px;
		padding: 3px 9px;
		border-radius: 999px;
		&.chip-primary { background: rgba(var(--app-brand-rgb), 0.12); color: var(--ion-color-primary); }
		&.chip-tertiary { background: rgba(64, 142, 226, 0.14); color: #2f6fb0; }
	}

	.asm-title {
		margin: 0 0 8px;
		font-size: 1.02rem;
		font-weight: 700;
		color: #1b2733;
		line-height: 1.25;
	}

	.asm-meta {
		display: flex;
		flex-direction: column;
		gap: 3px;
		.asm-meta-row {
			display: flex;
			align-items: center;
			gap: 7px;
			font-size: 0.8rem;
			color: #5a6b7b;
			ion-icon {
				font-size: 0.95rem;
				color: var(--ion-color-primary);
				flex: 0 0 auto;
			}
			strong { color: #34424f; margin-right: 2px; }
		}
	}

	.asm-stats {
		display: flex;
		gap: 8px;
		margin-top: 11px;
		padding-top: 10px;
		border-top: 1px solid #eef1f5;
		.asm-stat {
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			.num { font-size: 1.05rem; font-weight: 800; color: #34424f; }
			.lbl { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.4px; color: #93a1b0; }
			&.ok .num { color: var(--ion-color-success); }
			&.wait .num { color: var(--ion-color-warning); }
		}
	}

	.asm-card-chevron {
		align-self: center;
		color: #c3ccd6;
		font-size: 1.2rem;
		margin-right: 8px;
		flex: 0 0 auto;
	}
}

/* ── Empty ────────────────────────────────────────────── */
.asm-empty {
	text-align: center;
	padding: 56px 24px;
	color: var(--ion-color-medium);
	ion-icon { font-size: 4rem; opacity: 0.4; }
	h3 { margin: 12px 0 4px; font-size: 1.05rem; color: #5a6b7b; }
	p { margin: 0; font-size: 0.85rem; }
}

/* ── Skeleton ─────────────────────────────────────────── */
.asm-skeleton {
	padding: 12px 14px;
	.asm-skel-card {
		height: 118px;
		border-radius: 16px;
		margin-bottom: 12px;
		background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 37%, #eceff3 63%);
		background-size: 400% 100%;
		animation: asm-shimmer 1.3s ease infinite;
	}
}
@keyframes asm-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}
