.csst-events {
	width: 100%;
}

.csst-events .csst-events-month {
	color: #fff;
	background: var(--csst-primary);
	font-size: var(--csst-h2-size, 30px);
	margin: 40px 0 20px;
	padding: 10px 20px;
	border-radius: 6px;
}

.csst-events-month:first-child {
	margin-top: 0;
}

.csst-events-month-group {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.csst-event-item {
	display: flex;
	gap: 20px;
	background: #fff;
	border-radius: 10px;
	padding: 20px 24px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.csst-event-image {
	flex: 0 0 140px;
}

.csst-event-image img {
	display: block;
	width: 140px;
	height: 140px;
	object-fit: cover;
	border-radius: 8px;
}

.csst-event-body {
	flex: 1;
	min-width: 0;
}

.csst-event-category {
	display: inline-block;
	background: var(--csst-bg-tint);
	color: var(--csst-primary);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 10px;
	border-radius: 4px;
	margin-bottom: 8px;
}

.csst-event-title {
	margin: 0 0 8px;
	color: var(--csst-text);
}

.csst-event-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 14px;
	color: #50575e;
	margin-bottom: 8px;
}

.csst-event-date {
	font-weight: 600;
	color: var(--csst-primary);
}

.csst-event-cost--free {
	color: #2a7a3f;
	font-weight: 600;
}

.csst-event-location-block {
	margin-bottom: 10px;
}

.csst-event-location {
	font-size: 14px;
	color: #50575e;
	margin: 0;
}

.csst-event-map-link {
	display: block;
	font-size: 13px;
	margin: 0;
}

.csst-event-excerpt {
	font-size: 15px;
	line-height: 1.6;
	color: var(--csst-text);
	margin-bottom: 8px;
}

.csst-event-readmore {
	background: none;
	border: none;
	padding: 0;
	color: var(--csst-primary);
	font-weight: 600;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.csst-event-full-description p:last-child {
	margin-bottom: 0;
}

/* Modal popup for the full event description */
.csst-event-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
}

.csst-event-modal.is-open {
	display: block;
}

.csst-event-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.csst-event-modal__dialog {
	position: relative;
	max-width: 600px;
	margin: 8vh auto;
	max-height: 80vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 10px;
	padding: 32px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.csst-event-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #50575e;
	padding: 4px 8px;
}

.csst-event-modal__title {
	margin: 0 24px 16px 0;
	color: var(--csst-primary);
}

.csst-event-modal__body {
	font-size: 15px;
	line-height: 1.6;
}

body.csst-modal-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.csst-event-modal__dialog {
		margin: 5vh 16px;
		padding: 24px;
	}
}

.csst-event-actions {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-top: 14px;
}

.csst-btn-link {
	color: var(--csst-primary);
	font-weight: 600;
	font-size: 14px;
	text-decoration: underline;
}

.csst-events-toggle {
	text-align: center;
	margin: 30px 0;
}

.csst-events-toggle a {
	color: var(--csst-primary);
	font-weight: 600;
	text-decoration: none;
}

.csst-events-toggle a:hover {
	text-decoration: underline;
}

.csst-events-empty {
	text-align: center;
	color: #50575e;
	padding: 30px 0;
}

@media (max-width: 600px) {
	.csst-event-item {
		flex-direction: column;
	}
	.csst-event-image {
		flex-basis: auto;
	}
	.csst-event-image img {
		width: 100%;
		height: 160px;
	}
}
