/*
 * Structural properties only. Every colour, spacing, radius, font-size, and shadow value
 * lives in Elementor style controls (task group 7) so their `default` can govern it without
 * a competing declaration here — see the plugin README's Elementor load-order note.
 */

.evtcal-calendar {
	position: relative;
	min-width: 0;
}

.evtcal-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.evtcal-calendar__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	cursor: pointer;
}

.evtcal-calendar__live-region {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.evtcal-calendar.is-loading .evtcal-calendar__grid {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.evtcal-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
}

.evtcal-calendar__grid {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
}

.evtcal-calendar__day {
	position: relative;
	min-width: 0;
	overflow: hidden;
}

.evtcal-calendar__day-events {
	display: flex;
	flex-direction: column;
	position: relative;
	min-width: 0;
	overflow: hidden;
}

.evtcal-calendar__chip {
	display: block;
	position: relative;
	min-width: 0;
	overflow: hidden;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.evtcal-calendar__chip-body {
	display: block;
	min-width: 0;
}

.evtcal-calendar__chip-image img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Event popup ------------------------------------------------------------- */

.evtcal-calendar__details {
	display: none;
}

.evtcal-modal {
	width: min(560px, calc(100vw - 32px));
	max-height: min(85vh, 780px);
	padding: 0;
	border: 0;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	background: var(--evtcal-modal-background, #fff);
	color: var(--evtcal-modal-text-colour, inherit);
	overflow: visible;
}

.evtcal-modal::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.evtcal-modal__content {
	padding: 28px;
	max-height: min(85vh, 780px);
	overflow-y: auto;
}

.evtcal-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	line-height: 1;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
}

.evtcal-modal__close:hover,
.evtcal-modal__close:focus-visible {
	opacity: 1;
	background: rgba(0, 0, 0, 0.06);
}

.evtcal-event-detail__image img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
	margin-bottom: 18px;
}

.evtcal-event-detail__title {
	margin: 0 0 14px;
}

.evtcal-event-detail__meta {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 6px 16px;
	margin: 0 0 18px;
}

.evtcal-event-detail__meta dt {
	font-weight: 600;
	opacity: 0.65;
}

.evtcal-event-detail__meta dd {
	margin: 0;
}

.evtcal-event-detail__description {
	margin-bottom: 20px;
}

.evtcal-event-detail__description :first-child {
	margin-top: 0;
}

.evtcal-event-detail__description :last-child {
	margin-bottom: 0;
}

.evtcal-event-detail__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.evtcal-event-detail__button {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 4px;
	background: var(--evtcal-chip-colour, #2271b1);
	color: #fff;
	text-decoration: none;
}

@media screen and (max-width: 480px) {
	.evtcal-modal__content {
		padding: 22px 18px;
	}
}
