.cf-calendar,
.cf-calendar * {
	box-sizing: border-box;
}

.cf-calendar {
	--cf-accent: #0c71c3;
	--cf-ink: #333333;
	--cf-muted: #666666;
	--cf-line: #e6e6e6;
	--cf-soft: #f3f8fc;
	color: var(--cf-muted);
	background: transparent;
	font-family: Lato, Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	container-name: cfcal;
	container-type: inline-size;
}

.cf-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--cf-line);
}

.cf-title {
	margin: 0;
	color: var(--cf-ink);
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
}

.cf-views {
	display: flex;
	gap: 18px;
	padding-bottom: 4px;
}

.cf-view {
	padding: 0 0 3px;
	border-bottom: 2px solid transparent;
	color: #8c979e;
	font-family: Lato, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.cf-view.is-current {
	border-bottom-color: var(--cf-accent);
	color: var(--cf-accent);
}

.cf-view:hover {
	color: var(--cf-accent);
}

.cf-panel {
	border: 1px solid #d5d5d5;
	border-radius: 3px;
	background: #fff;
	overflow: hidden;
}

.cf-nav {
	display: grid;
	grid-template-columns: 2rem 1fr 2rem;
	align-items: center;
	margin: 0;
	padding: 12px 8px;
	border-bottom: 1px solid var(--cf-line);
	background: #f7f8f8;
}

.cf-calendar[data-view="grid"] .cf-nav {
	margin: 22px 0 8px;
	padding: 0;
	border-bottom: 0;
	background: transparent;
}

.cf-range {
	margin: 0;
	color: var(--cf-ink);
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0;
	text-align: center;
	text-transform: capitalize;
}

.cf-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 3px;
	color: var(--cf-accent);
	font-size: 1.35rem;
	line-height: 1;
	text-decoration: none;
}

.cf-nav-btn:hover {
	background: var(--cf-soft);
}

.cf-nav-btn.is-disabled {
	opacity: 0.25;
}

.cf-agenda {
	max-height: 520px;
	overflow: auto;
	background: #fff;
}

.cf-day {
	margin: 0;
	padding: 8px 0 4px;
}

.cf-day + .cf-day {
	border-top: 1px solid var(--cf-line);
}

.cf-dayhead {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 6px 16px 4px;
	font-weight: 700;
}

.cf-day.is-today .cf-dayhead {
	border-bottom: 2px solid var(--cf-accent);
}

.cf-date {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.85rem;
	height: 1.85rem;
	color: var(--cf-ink);
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1;
}

.cf-day.is-today .cf-date {
	border-radius: 50%;
	background: var(--cf-accent);
	color: #fff;
}

.cf-date-meta {
	color: #8c979e;
	font-family: Lato, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	text-transform: uppercase;
}

.cf-day.is-today .cf-date-meta {
	color: var(--cf-accent);
}

.cf-event {
	display: grid;
	grid-template-columns: 14px 4.5rem minmax(0, 1fr);
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 5px 16px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.cf-event:hover {
	background: var(--cf-soft);
}

.cf-calendar a.cf-event,
.cf-calendar a.cf-chip {
	text-decoration: none;
}

.cf-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cf-event, var(--cf-accent));
}

.cf-time {
	margin: 0;
	color: var(--cf-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

.cf-line {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}

.cf-name,
.cf-dialog h3 {
	margin: 0;
	color: var(--cf-ink);
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.4;
}

.cf-name {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	font-size: 14px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cf-dialog h3 {
	font-size: 16px;
}

.cf-location {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: #8c979e;
	font-size: 14px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cf-description {
	max-width: 62ch;
	margin-top: 10px;
	color: var(--cf-muted);
	font-size: 15px;
	font-weight: 400;
}

.cf-description a {
	color: var(--cf-accent);
}

.cf-empty {
	padding: 48px 0;
	color: var(--cf-muted);
	text-align: center;
}

.cf-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	margin-top: 8px;
}

.cf-dow {
	padding: 0 4px 10px;
	color: #8c979e;
	font-family: Lato, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
}

.cf-cell {
	min-height: 6.75rem;
	padding: 8px 6px 10px;
	border-top: 1px solid var(--cf-line);
	background: transparent;
}

.cf-cell.is-outside {
	color: #c5c5c5;
}

.cf-cell.is-outside .cf-chip {
	opacity: 0.45;
}

.cf-daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.7rem;
	height: 1.7rem;
	margin-bottom: 4px;
	border-radius: 3px;
	color: var(--cf-ink);
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
}

.cf-cell.is-today .cf-daynum {
	background: var(--cf-accent);
	color: #fff;
}

.cf-chip,
.cf-overflow {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin: 0;
	padding: 2px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--cf-ink);
	font-family: Lato, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
}

.cf-chip::before {
	content: "";
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	border-radius: 3px;
	background: var(--cf-event, var(--cf-accent));
}

.cf-chip span {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cf-chip:hover span {
	color: var(--cf-accent);
}

.cf-overflow {
	padding-left: 12px;
	color: var(--cf-accent);
	font-weight: 700;
	white-space: nowrap;
}

.cf-overflow:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cf-cell:not(.is-expanded) .cf-chip:nth-of-type(n+4) {
	display: none;
}

.cf-dialog {
	position: relative;
	width: min(32rem, calc(100vw - 2rem));
	max-height: min(80vh, 40rem);
	overflow: auto;
	padding: 28px 28px 24px;
	border: 1px solid var(--cf-line);
	border-radius: 3px;
	color: var(--cf-muted);
	font-family: Lato, Helvetica, Arial, sans-serif;
	box-shadow: 0 12px 32px rgba(12, 113, 195, 0.12);
}

.cf-dialog::backdrop {
	background: rgba(51, 51, 51, 0.35);
}

.cf-dialog-when {
	margin: 0 0 8px;
	color: var(--cf-accent);
	font-size: 13px;
	font-weight: 700;
}

.cf-dialog .cf-location {
	display: block;
	margin-top: 8px;
	overflow: visible;
	color: var(--cf-muted);
	font-size: 15px;
	white-space: normal;
}

.cf-dialog-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 1.75rem;
	height: 1.75rem;
	border: 0;
	border-radius: 3px;
	background: transparent;
	color: #8c979e;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.cf-dialog-close:hover {
	background: var(--cf-soft);
	color: var(--cf-accent);
}

.cf-calendar :focus-visible {
	outline: 2px solid var(--cf-accent);
	outline-offset: 3px;
}

@container cfcal (max-width: 640px) {
	.cf-toolbar {
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
	}

	.cf-title {
		font-size: 24px;
	}

	.cf-nav {
		grid-template-columns: 2.75rem 1fr 2.75rem;
	}

	.cf-nav-btn {
		width: 2.75rem;
		height: 2.75rem;
	}

	.cf-event {
		grid-template-columns: 12px 3.4rem minmax(0, 1fr);
		align-items: start;
		padding: 8px 12px;
	}

	.cf-dot {
		margin-top: 7px;
	}

	.cf-time {
		padding-top: 2px;
	}

	.cf-line {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.cf-name,
	.cf-location {
		display: -webkit-box;
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		overflow: hidden;
		white-space: normal;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.cf-dow {
		display: none;
	}

	.cf-grid {
		display: flex;
		flex-direction: column;
		margin-top: 0;
	}

	.cf-cell {
		display: none;
		min-height: 0;
		padding: 10px 12px;
	}

	.cf-cell:has(.cf-chip):not(.is-outside) {
		display: grid;
		grid-template-columns: 2.5rem minmax(0, 1fr);
		column-gap: 10px;
		align-items: center;
	}

	.cf-daynum {
		margin-bottom: 0;
	}

	.cf-chip,
	.cf-overflow {
		font-size: 13px;
		padding: 4px 0;
	}

	.cf-chip span {
		display: -webkit-box;
		white-space: normal;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}
}

@media (max-width: 720px) {
	.cf-dialog {
		padding: 22px 18px 18px;
	}
}

@media print {
	.cf-views,
	.cf-nav-btn,
	.cf-overflow,
	.cf-dialog {
		display: none !important;
	}
}
