/* Griglia annuari (lista) */
.yearbooks-grid {
	margin-top: 0.5rem;
}

.yearbook-card {
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yearbook-card:hover {
	transform: translateY(-4px);
}

.yearbook-card__cover {
	aspect-ratio: 3 / 4;
	background: #fff;
	border: 1px solid rgba(15, 61, 46, 0.12);
	border-radius: 0.35rem;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(15, 61, 46, 0.08);
	margin-bottom: 0.75rem;
}

.yearbook-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.yearbook-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, #f5f0e4, #e8dfd0);
	color: var(--green);
	font-size: 2.5rem;
}

.yearbook-card__title {
	font-family: var(--font-heading, 'Cormorant Garamond', serif);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--green);
	text-align: center;
	margin: 0;
}

/* Viewer sfogliabile */
.yearbook-viewer {
	position: relative;
	margin: 1.25rem auto 2rem;
	max-width: 1100px;
}

.yearbook-viewer__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	background: #fff;
	border: 1px solid rgba(15, 61, 46, 0.12);
	border-radius: 0.35rem;
	box-shadow: 0 4px 18px rgba(15, 61, 46, 0.06);
}

.yearbook-viewer__toolbar-group {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.yearbook-viewer__tool {
	width: 2.5rem;
	height: 2.5rem;
	border: 2px solid var(--green);
	border-radius: 50%;
	background: #fff;
	color: var(--green);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.yearbook-viewer__tool--text {
	width: auto;
	border-radius: 999px;
	padding: 0 0.85rem;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.yearbook-viewer__tool:hover:not(:disabled) {
	background: var(--green);
	color: #fff;
}

.yearbook-viewer__tool:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.yearbook-viewer__zoom-label {
	min-width: 3.2rem;
	text-align: center;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--green);
}

.yearbook-viewer__status {
	margin: 0;
	font-size: 0.95rem;
	color: #4a5c55;
	letter-spacing: 0.03em;
	text-align: center;
	flex: 1 1 auto;
}

.yearbook-viewer__hint {
	margin: 0.65rem 0 0;
	text-align: center;
	font-size: 0.82rem;
	color: #6a7a73;
}

.yearbook-viewer__zoom-scroller {
	position: relative;
	min-height: 480px;
	max-height: 78vh;
	overflow: hidden;
	background: linear-gradient(180deg, #f7f2e8 0%, #efe6d6 100%);
	border: 1px solid rgba(15, 61, 46, 0.12);
	border-radius: 0.35rem;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.yearbook-viewer__zoom-scroller.is-zoomed {
	overflow: auto;
	cursor: grab;
}

.yearbook-viewer__zoom-scroller.is-panning {
	cursor: grabbing;
	user-select: none;
}

.yearbook-viewer__zoom-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 480px;
	padding: 1.25rem;
	transform-origin: center center;
	transition: transform 0.2s ease;
}

.yearbook-viewer__flip-host {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.yearbook-flipbook {
	margin: 0 auto;
}

.yearbook-viewer__zoom-scroller.is-flip-locked .yearbook-flipbook {
	pointer-events: none;
}

.yearbook-viewer__loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	background: rgba(250, 246, 238, 0.92);
	z-index: 5;
	text-align: center;
	color: var(--green);
	font-weight: 500;
}

.yearbook-viewer__loading[hidden] {
	display: none !important;
}

.yearbook-viewer__loading-spinner {
	width: 2.5rem;
	height: 2.5rem;
	border: 3px solid rgba(15, 61, 46, 0.15);
	border-top-color: var(--green);
	border-radius: 50%;
	animation: yearbook-spin 0.8s linear infinite;
}

@keyframes yearbook-spin {
	to { transform: rotate(360deg); }
}

.yearbook-actions {
	margin: 2rem 0 1rem;
}

@media (max-width: 767.98px) {
	.yearbook-viewer__toolbar {
		justify-content: center;
	}

	.yearbook-viewer__status {
		order: 3;
		width: 100%;
	}

	.yearbook-viewer__zoom-scroller,
	.yearbook-viewer__zoom-inner {
		min-height: 420px;
	}
}
