/* Charisma Events Display – cards, filter bar and calendar views */
.ccm-events-grid,
.ccm-events-browser {
	--ccm-navy: #0b2545;
	--ccm-blue: #0a6ebd;
	--ccm-sky: #1e9be0;
	--ccm-orange: #e8622c;
	--ccm-light: #f4f7fb;
	--ccm-text: #3a4a5c;
	--ccm-muted: #66778a;
	--ccm-line: #dfe6ef;
	--ccm-radius: 6px;
	--ccm-heading: Montserrat, "Helvetica Neue", Arial, sans-serif;
}

.ccm-events-browser .screen-reader-text,
.ccm-events-grid .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------- Card grid ---------- */
.ccm-events-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
}
.ccm-event-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ccm-line);
	border-radius: var(--ccm-radius);
	box-shadow: 0 6px 18px rgba(11, 37, 69, 0.06);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ccm-event-card:hover {
	box-shadow: 0 12px 28px rgba(11, 37, 69, 0.12);
	transform: translateY(-2px);
}
.ccm-event-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 7;
	background: var(--ccm-navy);
	overflow: hidden;
}
.ccm-event-card__media img,
.ccm-event-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	transition: transform 0.4s ease;
}
.ccm-event-card:hover .ccm-event-card__media img {
	transform: scale(1.04);
}
.ccm-date-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	padding: 6px 8px 5px;
	background: var(--ccm-blue);
	color: #fff;
	border-radius: 4px;
	line-height: 1;
	font-family: var(--ccm-heading);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.ccm-date-badge__day {
	font-size: 22px;
	font-weight: 700;
}
.ccm-date-badge__month {
	margin-top: 3px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.ccm-event-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 20px;
}
.ccm-events-grid .ccm-event-card__title {
	margin: 0 0 4px;
	font-family: var(--ccm-heading);
	font-size: 1.08rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}
.ccm-event-card__title a {
	color: var(--ccm-blue);
	text-decoration: none;
}
.ccm-event-card__title a:hover,
.ccm-event-card__title a:focus {
	color: var(--ccm-sky);
}
.ccm-event-card__meta {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--ccm-muted);
}
.ccm-event-card__meta .ccm-icon {
	flex: none;
	margin-top: 2px;
	color: var(--ccm-blue);
}
.ccm-sep {
	margin: 0 4px;
	color: #b6c2d1;
}
.ccm-event-card__button,
.ccm-events-browser .ccm-event-card__button {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding: 8px 16px;
	border: 1.5px solid var(--ccm-blue);
	border-radius: var(--ccm-radius);
	background: transparent;
	color: var(--ccm-blue);
	font-family: var(--ccm-heading);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.ccm-event-card__body .ccm-event-card__button {
	margin-top: 10px;
}
.ccm-event-card__button:hover,
.ccm-event-card__button:focus {
	background: var(--ccm-blue);
	color: #fff;
}
.ccm-events-empty {
	padding: 36px 24px;
	text-align: center;
	background: var(--ccm-light, #f4f7fb);
	border: 1px dashed #c9d5e3;
	border-radius: 8px;
	color: var(--ccm-text, #3a4a5c);
}
.ccm-events-empty p {
	margin: 0 0 14px;
	font-size: 1.05rem;
}
.ccm-events-empty .ccm-event-card__button {
	align-self: center;
	margin: 0 auto;
}
.ccm-text-link {
	font-weight: 600;
	text-decoration: none;
}

/* ---------- Events browser ---------- */
.ccm-events-browser {
	color: var(--ccm-text);
	scroll-margin-top: 110px;
}
.ccm-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px 16px;
	padding: 18px 20px;
	margin: 0 0 18px;
	background: #fff;
	border: 1px solid var(--ccm-line);
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(11, 37, 69, 0.05);
}
.ccm-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.ccm-field label,
.ccm-field__label {
	font-family: var(--ccm-heading);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ccm-navy);
}
.ccm-filter-bar select,
.ccm-filter-bar input[type="date"],
.ccm-filter-bar input[type="search"] {
	box-sizing: border-box;
	height: 42px;
	min-width: 130px;
	padding: 0 12px;
	border: 1px solid #cbd5e1;
	border-radius: var(--ccm-radius);
	background-color: #fff;
	color: var(--ccm-text);
	font: inherit;
	font-size: 0.95rem;
}
.ccm-filter-bar select:focus,
.ccm-filter-bar input:focus,
.ccm-filter-bar button:focus-visible,
.ccm-chip:focus-visible,
.ccm-view-switch a:focus-visible {
	outline: 2px solid var(--ccm-sky);
	outline-offset: 2px;
}
.ccm-field--search {
	flex: 1 1 200px;
}
.ccm-search-wrap {
	position: relative;
	display: block;
}
.ccm-filter-bar .ccm-search-wrap input {
	width: 100%;
	padding-right: 42px;
}
.ccm-search-btn {
	position: absolute;
	top: 0;
	right: 0;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ccm-blue);
	cursor: pointer;
}
.ccm-toggle {
	display: inline-flex;
	border: 1px solid #cbd5e1;
	border-radius: var(--ccm-radius);
	overflow: hidden;
}
.ccm-toggle button {
	height: 40px;
	padding: 0 16px;
	border: 0;
	background: #fff;
	color: var(--ccm-text);
	font-family: var(--ccm-heading);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}
.ccm-toggle button + button {
	border-left: 1px solid #cbd5e1;
}
.ccm-toggle button[aria-pressed="true"] {
	background: var(--ccm-blue);
	color: #fff;
}
.ccm-field--actions {
	flex-direction: row;
	align-items: center;
	gap: 8px;
}
.ccm-chip,
.ccm-apply {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 42px;
	padding: 0 16px;
	border: 1.5px solid var(--ccm-blue);
	border-radius: var(--ccm-radius);
	background: #fff;
	color: var(--ccm-blue);
	font-family: var(--ccm-heading);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}
.ccm-chip:hover,
.ccm-chip:focus {
	background: var(--ccm-blue);
	color: #fff;
}
.ccm-chip--ghost {
	border-color: #cbd5e1;
	color: var(--ccm-text);
}
.ccm-apply {
	background: var(--ccm-blue);
	color: #fff;
}
.js-ccm .ccm-apply {
	display: none;
}

.ccm-view-switch {
	display: inline-flex;
	margin: 0 0 18px;
	padding: 4px;
	gap: 4px;
	background: var(--ccm-light);
	border-radius: 8px;
}
.ccm-view-switch a {
	padding: 8px 18px;
	border-radius: 6px;
	color: var(--ccm-navy);
	font-family: var(--ccm-heading);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}
.ccm-view-switch a.is-active {
	background: var(--ccm-blue);
	color: #fff;
}
.ccm-results-count {
	margin: 0 0 18px;
	font-size: 0.9rem;
	color: var(--ccm-muted);
}

.ccm-list__group + .ccm-list__group {
	margin-top: 36px;
}
.ccm-events-browser .ccm-list__heading {
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ccm-line);
	font-family: var(--ccm-heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ccm-navy);
	letter-spacing: 0;
}
.ccm-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 32px;
}
.ccm-pager__status {
	font-size: 0.9rem;
	color: var(--ccm-muted);
}

/* Month + day navigation */
.ccm-period-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
}
.ccm-events-browser .ccm-period-nav__title {
	margin: 0;
	font-family: var(--ccm-heading);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--ccm-navy);
	text-align: center;
	letter-spacing: 0;
}
.ccm-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1.5px solid var(--ccm-line);
	border-radius: 50%;
	color: var(--ccm-blue);
	text-decoration: none;
	background: #fff;
}
.ccm-arrow:hover,
.ccm-arrow:focus {
	border-color: var(--ccm-blue);
	background: var(--ccm-blue);
	color: #fff;
}

/* Month grid */
.ccm-month__grid {
	border: 1px solid var(--ccm-line);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.ccm-month__row {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}
.ccm-month__row + .ccm-month__row {
	border-top: 1px solid var(--ccm-line);
}
.ccm-month__row--head {
	background: var(--ccm-navy);
}
.ccm-month__dow {
	padding: 10px 8px;
	color: #fff;
	font-family: var(--ccm-heading);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
}
.ccm-month__cell {
	position: relative;
	min-height: 112px;
	padding: 8px;
	background: #fff;
}
.ccm-month__cell + .ccm-month__cell {
	border-left: 1px solid var(--ccm-line);
}
.ccm-month__cell.is-outside {
	background: #fafbfd;
}
.ccm-month__cell.is-today {
	background: #eaf4fc;
}
.ccm-month__day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: var(--ccm-navy);
	font-family: var(--ccm-heading);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}
.ccm-month__cell.is-past .ccm-month__day {
	color: #9aa8b8;
}
.ccm-month__cell.is-today .ccm-month__day {
	background: var(--ccm-blue);
	color: #fff;
}
.ccm-month__day:hover,
.ccm-month__day:focus {
	background: var(--ccm-sky);
	color: #fff;
}
.ccm-month__events {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}
.ccm-month__events li {
	margin: 0 0 4px;
}
.ccm-month__events a {
	display: block;
	padding: 4px 6px;
	border-left: 3px solid var(--ccm-blue);
	border-radius: 3px;
	background: var(--ccm-light);
	color: var(--ccm-navy);
	font-size: 0.75rem;
	line-height: 1.3;
	text-decoration: none;
}
.ccm-month__events a:hover,
.ccm-month__events a:focus {
	background: var(--ccm-blue);
	color: #fff;
}
.ccm-month__cell.is-past .ccm-month__events a {
	opacity: 0.65;
}
.ccm-month__time {
	font-weight: 700;
}
.ccm-month__dot {
	display: none;
}
.ccm-month__agenda {
	display: none;
	margin-top: 28px;
}
.ccm-month .ccm-events-empty {
	margin-top: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.ccm-events-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 599px) {
	.ccm-events-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}
}
@media (max-width: 781px) {
	.ccm-filter-bar {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}
	.ccm-filter-bar select,
	.ccm-filter-bar input[type="date"],
	.ccm-filter-bar input[type="search"] {
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}
	.ccm-field--search {
		flex: 0 0 auto;
	}
	.ccm-toggle {
		display: flex;
	}
	.ccm-toggle button {
		flex: 1;
	}
	.ccm-field--actions {
		flex-wrap: wrap;
	}
	.ccm-field--actions .ccm-chip {
		flex: 1;
		justify-content: center;
	}
	.ccm-view-switch {
		display: flex;
	}
	.ccm-view-switch a {
		flex: 1;
		text-align: center;
	}
	.ccm-month__cell {
		min-height: 52px;
		padding: 4px;
		text-align: center;
	}
	.ccm-month__dow {
		padding: 8px 2px;
		font-size: 0.65rem;
		letter-spacing: 0.02em;
	}
	.ccm-month__events {
		display: none;
	}
	.ccm-month__dot {
		display: block;
		width: 6px;
		height: 6px;
		margin: 2px auto 0;
		border-radius: 50%;
		background: var(--ccm-orange);
	}
	.ccm-month__agenda {
		display: block;
	}
	.ccm-events-browser .ccm-period-nav__title {
		font-size: 1.1rem;
	}
}
@media (min-width: 600px) and (max-width: 781px) {
	.ccm-filter-bar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: end;
	}
}
@media (prefers-reduced-motion: reduce) {
	.ccm-event-card,
	.ccm-event-card__media img {
		transition: none;
	}
	.ccm-event-card:hover,
	.ccm-event-card:hover .ccm-event-card__media img {
		transform: none;
	}
}
