/**
 * EM Events Manager — stili frontend.
 * Prefisso .emev- per isolamento dal tema Salient. Mobile-first.
 */

/* ---------- Badge gruppi (cuore della visualizzazione) ---------- */
.emev-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0;
}

.emev-badge {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 999px;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

a.emev-badge:hover,
a.emev-badge:focus {
	opacity: 0.88;
	text-decoration: none;
}

.emev-badge--small {
	padding: 3px 8px;
	font-size: 12px;
}

/* ---------- Elementi comuni ---------- */
.emev-layout .emev-date,
.emev-layout .emev-time,
.emev-layout .emev-location {
	display: inline-block;
	font-size: 14px;
}

.emev-layout .emev-date {
	font-weight: 700;
}

.emev-empty {
	padding: 16px;
	font-style: italic;
	opacity: 0.8;
}

/* ---------- Layout lista ---------- */
.emev-list__item {
	display: flex;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}

.emev-list__thumb img {
	width: 90px;
	height: 90px;
	object-fit: cover;
	border-radius: 8px;
}

.emev-list__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 4px;
	opacity: 0.85;
}

.emev-list__title {
	margin: 2px 0 4px;
	font-size: 18px;
}

/* ---------- Layout griglia ---------- */
.emev-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: 22px;
}

.emev-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.emev-card__thumb img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.emev-card__body {
	padding: 14px 16px 18px;
}

.emev-card__title {
	margin: 6px 0;
	font-size: 18px;
}

.emev-card__excerpt {
	font-size: 14px;
	opacity: 0.9;
}

/* ---------- Layout timeline ---------- */
.emev-timeline {
	position: relative;
	padding: 10px 0;
}

.emev-timeline__line {
	position: absolute;
	left: 18px;
	top: 0;
	bottom: 0;
	width: 3px;
	background: rgba( 0, 0, 0, 0.12 );
}

.emev-timeline__item {
	position: relative;
	padding-left: 48px;
	margin-bottom: 22px;
}

.emev-timeline__dot {
	position: absolute;
	left: 11px;
	top: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #2c7a3f;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px rgba( 0, 0, 0, 0.12 );
}

.emev-timeline__date {
	font-weight: 700;
	font-size: 14px;
}

.emev-timeline__title {
	margin: 4px 0;
	font-size: 18px;
}

/* Timeline alternata sx/dx solo su desktop. */
@media ( min-width: 782px ) {
	.emev-timeline__line {
		left: 50%;
	}
	.emev-timeline__item {
		width: 50%;
		padding-left: 0;
	}
	.emev-timeline__item--left {
		left: 0;
		padding-right: 48px;
		text-align: right;
	}
	.emev-timeline__item--right {
		left: 50%;
		padding-left: 48px;
	}
	.emev-timeline__item--left .emev-timeline__dot {
		left: auto;
		right: -8px;
	}
	.emev-timeline__item--right .emev-timeline__dot {
		left: -8px;
	}
	.emev-timeline__item--left .emev-badges {
		justify-content: flex-end;
	}
}

/* ---------- Calendario ---------- */
.emev-calendar__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 12px;
}

.emev-calendar__heading {
	font-size: 18px;
	font-weight: 700;
	text-transform: capitalize;
	min-width: 180px;
	text-align: center;
}

.emev-calendar__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.emev-calendar__table th {
	padding: 6px;
	font-size: 13px;
	text-align: center;
	background: rgba( 0, 0, 0, 0.04 );
}

.emev-calendar__table td {
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	vertical-align: top;
	height: 90px;
	padding: 4px;
}

.emev-cal-daynum {
	font-size: 13px;
	font-weight: 600;
	opacity: 0.7;
}

.emev-cal-day--today {
	background: rgba( 44, 122, 63, 0.08 );
}

.emev-cal-day--has-events .emev-cal-daynum {
	color: #2c7a3f;
}

.emev-cal-event {
	display: block;
	margin-top: 4px;
	padding: 3px 5px;
	border-radius: 6px;
	background: rgba( 0, 0, 0, 0.05 );
	font-size: 12px;
	text-decoration: none;
	color: inherit;
}

.emev-cal-event__title {
	display: block;
	font-weight: 600;
}

.emev-cal-empty {
	background: rgba( 0, 0, 0, 0.02 );
}

/* Calendario responsive: su mobile niente altezza fissa. */
@media ( max-width: 600px ) {
	.emev-calendar__table td {
		height: auto;
		min-height: 48px;
	}
	.emev-cal-event__title {
		font-size: 11px;
	}
}

/* ---------- Singolo evento ---------- */
.emev-single__thumb img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: 12px;
}

.emev-single__title {
	margin: 10px 0;
}

.emev-single__meta {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/* ---------- Pulsanti frontend ---------- */
.emev-btn {
	display: inline-block;
	min-height: 44px;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: #2c7a3f;
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
}

.emev-btn--secondary {
	background: #3a4a5a;
}

.emev-btn:hover,
.emev-btn:focus {
	opacity: 0.92;
	color: #fff;
}
