/**
 * Calendario Eventi — brand defaults (EDP).
 * Independent bundle: re-declares the brand tokens.
 */
:root {
	--edp-teal: #002435;
	--edp-cream: #f9f7f3;
	--edp-gold: #feca91;
	--edp-ink: #1e1e1e;
	--edp-border: #e6e1d8;
	--edp-gray: #7a7a7a;
	--edp-danger: #b32d2e;
}

.edp-cal {
	font-family: Roboto, Arial, sans-serif;
	color: var(--edp-ink);
	background: #fff;
	border: 1px solid var(--edp-border);
	border-radius: 8px;
	padding: 18px;
}

/* ----------------------------- Header ------------------------------ */

.edp-cal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.edp-cal__title {
	font-family: 'Roboto Slab', Georgia, serif;
	font-size: 20px;
	font-weight: 700;
	color: var(--edp-teal);
	text-transform: capitalize;
}

.edp-cal__nav-btn {
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	background: transparent;
	color: var(--edp-teal);
	border: 1px solid var(--edp-border);
	border-radius: 999px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.edp-cal__nav-btn:hover:not(:disabled) {
	background: var(--edp-teal);
	border-color: var(--edp-teal);
	color: var(--edp-cream);
}

.edp-cal__nav-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------------------------- Weekdays ----------------------------- */

.edp-cal__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 4px;
}

.edp-cal__weekday {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--edp-gray);
	padding: 6px 2px;
	border-bottom: 2px solid var(--edp-border);
}

/* ------------------------------ Grid ------------------------------- */

.edp-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.edp-cal__day {
	min-height: 84px;
	padding: 6px;
	border: 1px solid var(--edp-border);
	margin: -1px 0 0 -1px; /* collapse doubled borders */
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.edp-cal__day--other {
	background: var(--edp-cream);
}

.edp-cal__day--other .edp-cal__daynum {
	opacity: 0.35;
}

.edp-cal__day--past .edp-cal__events {
	opacity: 0.55;
}

.edp-cal__day--today {
	box-shadow: inset 0 0 0 2px var(--edp-gold);
}

.edp-cal__day--today .edp-cal__daynum {
	background: var(--edp-gold);
	color: var(--edp-teal);
}

.edp-cal__daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--edp-ink);
	align-self: flex-start;
}

/* ------------------------------ Chips ------------------------------ */

.edp-cal__events {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.edp-cal__chip {
	display: block;
	background: var(--edp-teal);
	color: var(--edp-cream);
	border: 1px solid transparent;
	border-radius: 4px;
	padding: 3px 7px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.edp-cal__chip:hover {
	background: var(--edp-gold);
	color: var(--edp-teal);
}

.edp-cal__chip--past {
	background: transparent;
	color: var(--edp-gray);
	border-color: var(--edp-border);
}

.edp-cal__chip--past:hover {
	background: var(--edp-border);
	color: var(--edp-ink);
}

.edp-cal__chip--soldout {
	background: var(--edp-danger);
	color: #ffffff;
}

.edp-cal__chip--soldout:hover {
	background: var(--edp-teal);
	color: var(--edp-cream);
}

.edp-cal__more {
	font-size: 11px;
	color: var(--edp-gray);
	font-weight: 600;
}

/* --------------------------- Responsive ---------------------------- */

@media (max-width: 640px) {
	.edp-cal {
		padding: 10px;
	}

	.edp-cal__day {
		min-height: 56px;
		padding: 4px;
	}

	.edp-cal__chip {
		font-size: 0;         /* dot mode: title hidden, chip becomes a marker */
		padding: 0;
		width: 8px;
		height: 8px;
		border-radius: 999px;
		align-self: flex-start;
	}

	.edp-cal__more {
		font-size: 10px;
	}
}
