/*
 * Preziosissimo – Appuntamenti: stile di base.
 * Usa le variabili del tema Preziosissimo 2026 se presenti (--pz-*), altrimenti
 * i valori dopo la virgola. Il tema, caricato dopo, può ridefinire tutto.
 */

.pza-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.2em;
}

/* Card */
.pz-card.pz-event {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	background: var(--pz-surface, #fff);
	border: 1px solid var(--pz-line, #e6dccf);
	border-radius: var(--pz-radius, 14px);
	color: var(--pz-ink, #292422);
	text-decoration: none;
	box-shadow: var(--pz-shadow, 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .07));
}

.pz-event__body {
	display: flex;
	align-items: flex-start;
	gap: .9em;
	padding: 1.1em 1.2em 1.2em;
}

.pz-event__text {
	display: flex;
	flex-direction: column;
	gap: .3em;
	min-width: 0;
}

.pz-event__title {
	font-weight: 600;
	font-size: 1.05rem;
	line-height: 1.25;
	color: var(--pz-ink, #292422);
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: normal;
}

.pz-event__when,
.pz-event__rip {
	font-size: .82rem;
	color: var(--pz-muted, #6b605a);
}

/* Badge data */
.pz-date {
	flex: 0 0 auto;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 3.6em;
	height: 4.2em;
	border-radius: 10px;
	background: var(--pz-red-fill, #8e2224);
	color: #fff;
	line-height: 1;
}

.pz-date__day { font-size: 1.45em; font-weight: 600; }
.pz-date__month { font-size: .68em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: .25em; color: #f3e3c3; }
.pz-date__year { font-size: .62em; font-weight: 600; margin-top: .2em; opacity: .8; }

/* Fascia «Ogni settimana» */
.pza-sett {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5em;
	margin-top: 1.4em;
	padding-top: 1.1em;
	border-top: 1px solid var(--pz-line, #e6dccf);
	font-size: .9rem;
}

.pza-sett__label {
	color: var(--pz-red, #8e2224);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	margin-right: .3em;
}

a.pza-sett__item {
	background: var(--pz-surface, #fff);
	border: 1px solid var(--pz-line, #e6dccf);
	border-radius: 999px;
	padding: .3em .9em;
	color: var(--pz-ink, #292422);
	text-decoration: none;
	box-shadow: none;
}

a.pza-sett__item:hover,
a.pza-sett__item:focus {
	border-color: var(--pz-red, #8e2224);
	color: var(--pz-ink, #292422);
}

.pza-sett__nota {
	font-size: .8rem;
	color: var(--pz-muted, #6b605a);
	font-style: italic;
}

/* Elenco compatto */
.pz-event-list { list-style: none; margin: 0; padding: 0; }
.pz-event-list li { padding: 0 0 .8em; border: 0; }
.pz-event-list a { display: flex; align-items: center; gap: .8em; text-decoration: none; color: var(--pz-ink, #292422); }
.pz-event-list .pz-date { font-size: .8rem; }
.pz-event-list strong { display: block; line-height: 1.25; }
.pz-event-list small { display: block; color: var(--pz-muted, #6b605a); font-size: .8rem; }
.pz-empty { color: var(--pz-muted, #6b605a); font-style: italic; }

/* Riquadro nella scheda / nell'articolo */
.pz-evento-box {
	display: flex;
	align-items: flex-start;
	gap: 1em;
	background: var(--pz-cream-bg, #f3e3c3);
	border-left: 4px solid var(--pz-red-fill, #8e2224);
	border-radius: 0 10px 10px 0;
	padding: 1em 1.2em;
	margin: 0 0 1.6em;
}

.pz-evento-box p { margin: 0; }
.pz-evento-box__when { font-weight: 700; color: var(--pz-red-dark, #5c1416); font-size: 1.05rem; }
.pz-evento-box__add { font-size: .88rem; margin-top: .35em !important; }

/* Calendario */
.pz-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin: 1em 0; }
.pz-cal__title { margin: 0; padding: 0; }
.pz-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 1.5em; }
.pz-cal__dow { text-align: center; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--pz-muted, #6b605a); }
.pz-cal__cell { min-height: 96px; background: var(--pz-surface, #fff); border: 1px solid var(--pz-line, #e6dccf); border-radius: 10px; padding: .4em; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pz-cal__cell--empty { background: transparent; border-color: transparent; }
.pz-cal__cell.is-past .pz-cal__num { opacity: .5; }
.pz-cal__cell.is-today { border: 2px solid var(--pz-red-fill, #8e2224); }
.pz-cal__num { font-size: .85rem; font-weight: 700; padding: 0 .3em; }
.pz-cal__ev { display: block; background: var(--pz-cream-bg, #f3e3c3); color: var(--pz-red-dark, #5c1416); border-radius: 6px; padding: .25em .45em; font-size: .74rem; font-weight: 600; line-height: 1.25; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: none; }
.pz-cal__ev--rip { background: transparent; border: 1px dashed var(--pz-line, #e6dccf); color: var(--pz-muted, #6b605a); font-weight: 500; }
.pz-cal__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2em; margin-top: 1.5em; }

html[data-theme="dark"] .pz-evento-box__when,
html[data-theme="dark"] .pz-cal__ev { color: #f3e3c3; }

@media screen and (max-width: 47.99em) {
	.pz-cal__grid { gap: 3px; }
	.pz-cal__cell { min-height: 0; aspect-ratio: 1; align-items: center; justify-content: center; padding: 0; }
	.pz-cal__ev { display: none; }
	.pz-cal__cell.has-events { background: var(--pz-cream-bg, #f3e3c3); }
	.pz-cal__cell.has-events::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pz-red-fill, #8e2224); }
}
