.mod-google-full-calendar {
	--gfc-accent: #71b2fb;
	--gfc-border: #d7dee2;
	--gfc-foreground: #172126;
	--gfc-muted: #5f6c72;
	--gfc-surface: #ffffff;
	--gfc-soft: #f5f7f8;
	background: var(--gfc-surface);
	color: var(--gfc-foreground);
	box-sizing: border-box;
	container-type: inline-size;
	padding: clamp(0.5rem, 2%, 1.25rem);
	width: 100%;
}

.mod-google-full-calendar--dark {
	--gfc-border: rgba(255, 255, 255, 0.18);
	--gfc-foreground: #ffffff;
	--gfc-muted: rgba(255, 255, 255, 0.72);
	--gfc-surface: #101820;
	--gfc-soft: rgba(255, 255, 255, 0.08);
	background: var(--gfc-surface);
	border: 1px solid var(--gfc-border);
	border-radius: 8px;
}

:where(.moduletable, .module, .card, aside, section, div):has(> .mod-google-full-calendar--dark) > :where(h1, h2, h3, h4, h5, h6, .module-title, .moduletable-title, .card-header),
:where(.moduletable, .module, .card, aside, section, div):has(.mod-google-full-calendar--dark) :where(.module-title, .moduletable-title, .card-header) {
	color: #ffffff !important;
}

.mod-google-full-calendar__message,
.mod-google-full-calendar__diagnostic {
	color: var(--gfc-muted);
	font-size: 0.92rem;
	line-height: 1.4;
	margin: 0 0 0.75rem;
}

.mod-google-full-calendar__diagnostic {
	border-left: 3px solid var(--gfc-border);
	margin-top: 0.75rem;
	padding-left: 0.75rem;
}

.mod-google-full-calendar .fc {
	--fc-page-bg-color: var(--gfc-surface);
	--fc-neutral-bg-color: var(--gfc-soft);
	--fc-list-event-hover-bg-color: var(--gfc-soft);
	color: var(--gfc-foreground);
	font-size: 0.92rem;
}

.mod-google-full-calendar .fc .fc-header-toolbar {
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.mod-google-full-calendar .fc .fc-toolbar-title {
	color: var(--gfc-foreground);
	font-size: 1.35rem;
	line-height: 1.25;
	margin: 0;
}

.mod-google-full-calendar .fc a,
.mod-google-full-calendar .fc a:visited {
	color: inherit;
}

.mod-google-full-calendar .fc-theme-standard td,
.mod-google-full-calendar .fc-theme-standard th,
.mod-google-full-calendar .fc-scrollgrid {
	border-color: var(--gfc-border);
}

.mod-google-full-calendar .fc-col-header-cell,
.mod-google-full-calendar .fc-daygrid-day,
.mod-google-full-calendar .fc-timegrid-slot,
.mod-google-full-calendar .fc-list-day-cushion {
	background: var(--gfc-surface);
}

.mod-google-full-calendar .fc-day-today {
	background: color-mix(in srgb, var(--gfc-accent) 16%, transparent) !important;
}

.mod-google-full-calendar .fc .fc-button-primary {
	background: var(--gfc-soft);
	border-color: var(--gfc-border);
	color: var(--gfc-foreground);
	font: inherit;
	min-height: 2.5rem;
	text-transform: capitalize;
}

.mod-google-full-calendar .fc .fc-button-primary:disabled {
	opacity: 0.65;
}

.mod-google-full-calendar .fc .fc-button-primary:focus-visible {
	outline: 2px solid var(--gfc-foreground);
	outline-offset: 2px;
}

.mod-google-full-calendar .fc .fc-button-primary:not(:disabled):hover,
.mod-google-full-calendar .fc .fc-button-primary:not(:disabled).fc-button-active {
	background: var(--gfc-accent);
	border-color: var(--gfc-accent);
	color: #101820;
}

/* Draw navigation arrows without relying on the template's icon styles. */
.mod-google-full-calendar .fc :is(.fc-prev-button, .fc-next-button) {
	display: inline-grid;
	min-width: 2.5rem;
	place-items: center;
}

.mod-google-full-calendar .fc :is(.fc-prev-button, .fc-next-button) .fc-icon {
	display: none;
}

.mod-google-full-calendar .fc :is(.fc-prev-button, .fc-next-button)::after {
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	transform: rotate(-45deg);
}

.mod-google-full-calendar .fc .fc-prev-button::after {
	transform: rotate(135deg);
}

.mod-google-full-calendar .fc-event {
	border-radius: 4px;
	font-weight: 700;
}

.mod-google-full-calendar .fc .fc-daygrid-block-event .fc-event-main-frame {
	display: block;
	padding: 0.15rem 0.25rem;
	line-height: 1.25;
}

.mod-google-full-calendar .fc .fc-daygrid-block-event .fc-event-title {
	white-space: normal;
	overflow-wrap: anywhere;
}

.mod-google-full-calendar .fc .fc-daygrid-block-event .fc-event-time {
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	font-variant-numeric: tabular-nums;
}

.mod-google-full-calendar--dark .fc .fc-toolbar-title,
.mod-google-full-calendar--dark .fc .fc-col-header-cell-cushion,
.mod-google-full-calendar--dark .fc .fc-daygrid-day-number,
.mod-google-full-calendar--dark .fc .fc-list-day-text,
.mod-google-full-calendar--dark .fc .fc-list-day-side-text,
.mod-google-full-calendar--dark .fc .fc-list-event-title a,
.mod-google-full-calendar--dark .fc .fc-daygrid-more-link {
	color: #ffffff !important;
}

.mod-google-full-calendar--dark .fc-list-event:hover td {
	background: var(--gfc-soft);
}

@container (max-width: 42rem) {
	.mod-google-full-calendar .fc .fc-header-toolbar {
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.5rem;
	}

	.mod-google-full-calendar .fc .fc-toolbar-chunk:has(.fc-toolbar-title) {
		order: -1;
		width: 100%;
		text-align: center;
	}
}

@container (max-width: 600px) {
	.mod-google-full-calendar .fc .fc-daygrid-block-event .fc-event-main-frame {
		padding-inline: 0.15rem;
	}

	.mod-google-full-calendar .fc .fc-daygrid-block-event .fc-event-time {
		font-size: 0.75rem;
	}

	.mod-google-full-calendar .fc .fc-button-primary {
		min-height: 44px;
	}

	.mod-google-full-calendar .fc :is(.fc-prev-button, .fc-next-button) {
		min-width: 44px;
	}

	.mod-google-full-calendar .fc .fc-list-event {
		display: grid;
		grid-template-columns: 0.65rem minmax(0, 1fr);
		column-gap: 0.45rem;
		row-gap: 0.2rem;
		align-items: baseline;
		border-top: 1px solid var(--gfc-border);
		padding: 0.6rem 0.65rem;
	}

	.mod-google-full-calendar .fc .fc-list-event > td {
		border: 0;
		padding: 0;
	}

	.mod-google-full-calendar .fc .fc-list-event > td.fc-list-event-time {
		grid-column: 2;
		grid-row: 2;
		/* FullCalendar gives this table cell a 1px width in its desktop layout. */
		width: auto;
		min-width: 0;
		justify-self: stretch;
		color: var(--gfc-muted);
		font-size: 0.8rem;
		white-space: normal;
		word-break: normal;
		overflow-wrap: normal;
	}

	.mod-google-full-calendar .fc .fc-list-event-graphic {
		grid-column: 1;
		grid-row: 1;
	}

	.mod-google-full-calendar .fc .fc-list-event-title {
		grid-column: 2;
		grid-row: 1;
		font-weight: 700;
		line-height: 1.3;
		overflow-wrap: anywhere;
	}

	.mod-google-full-calendar .fc .fc-list-event-title a {
		display: block;
		color: var(--gfc-foreground);
		text-decoration: underline;
		text-underline-offset: 0.15em;
	}
}
