.pp-event-calendar-container.fc {

	.fc-view-harness {

		table {
			overflow: auto;
			margin: auto;
		}
	}

	:where(table colgroup+thead tr:first-child th, table thead:first-child tr:first-child th) {
		border-block-start: none;
	}
}

.pp-event-calendar-popup,
.pp-event-calendar-popup-close.pp-icon,
.pp-event-calendar-popup-wrapper {
	display: flex;
	justify-content: center
}

.pp-event-calendar-popup-wrapper,
.pp-event-calendar-popup-wrapper.pp-event-calendar-popup-ready::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transition: all .3s ease-out
}

.pp-event-calendar-popup-wrapper {
	--pp-event-calendar-popup-image-width: 16.666667%;
	position: fixed;
	z-index: -1;
	visibility: hidden;
	align-items: center;
}

.pp-event-calendar-popup-wrapper.pp-event-calendar-popup-ready {
	z-index: 99999;
	visibility: visible;
	opacity: 1
}

.pp-event-calendar-popup-wrapper.pp-event-calendar-popup-ready::before {
	position: absolute;
	background-color: rgba(0, 0, 0, .7);
	content: ""
}

.pp-event-calendar-popup,
.pp-event-calendar-popup-close {
	background-color: #fff;
	transition: all ease .4s
}

.pp-event-calendar-popup {
	position: relative;
	max-height: 100%;
	width: 900px;
	box-shadow: 0 3px 13px 0 rgba(0, 0, 0, .08);
	transform: scale(0)
}

.pp-event-calendar-popup-wrapper.pp-event-calendar-popup-ready .pp-event-calendar-popup {
	transform: scale(1)
}

.pp-event-calendar-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 9999;
	overflow: visible;
	align-items: center;
	width: 32px;
	height: 32px;
	color: #44474C;
	text-align: center;
	font-size: 20px;
	cursor: pointer
}

.pp-event-calendar-popup-body-wrap {
	overflow-x: hidden;
	overflow-y: auto
}

.pp-event-calendar-popup-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-wrap: wrap
}

.pp-event-calendar-popup-content,
.pp-event-calendar-popup-image,
.pp-event-calendar-container .fc-toolbar.fc-header-toolbar button.fc-dayGridMonth-button,
.pp-event-calendar-container .fc-toolbar.fc-header-toolbar button.fc-listMonth-button,
.pp-event-calendar-container .fc-toolbar.fc-header-toolbar button.fc-listWeek-button,
.pp-event-calendar-container .fc-toolbar.fc-header-toolbar button.fc-timeGridDay-button,
.pp-event-calendar-container .fc-toolbar.fc-header-toolbar button.fc-timeGridWeek-button {
	position: relative
}

.pp-event-calendar-popup-image {
	overflow: hidden;

	img {
		max-width: 100%;
		height: auto;
	}
}

.pp-event-calendar-popup-layout-1,
.pp-event-calendar-popup-layout-2 {

	.pp-event-calendar-popup-image {
		height: var(--pp-event-calendar-popup-image-height, 180px);
		width: 100%;

		img {
			object-fit: cover;
			object-position: center;
			height: 100%;
			width: 100%;
		}
	}
}

// Layout 2
.pp-event-calendar-popup-image-title {
	display: none;
	margin: 0;
}

.pp-event-calendar-popup-layout-2.pp-event-calendar-popup-has-image {

	.pp-event-calendar-popup-image-title:not(:empty) {
		display: flex;
		align-items: flex-end;
		position: absolute;
		inset: 0;
		padding: 20px;
		background: linear-gradient(to top, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, 0) 60%);
		color: #fff;
		font-weight: 700;
		font-size: 24px;
		line-height: 1.3;
	}

	.pp-event-calendar-popup-content > .pp-event-calendar-event-title {
		display: none !important;
	}
}

// Layout 3
.pp-event-calendar-popup-layout-3 {

	.pp-event-calendar-popup-body {
		flex-direction: row;
		align-items: stretch;
	}

	.pp-event-calendar-popup-image {
		flex: 0 0 var(--pp-event-calendar-popup-image-width, 16.666667%);
		max-width: var(--pp-event-calendar-popup-image-width, 16.666667%);

		img {
			object-fit: cover;
			object-position: center;
			width: 100%;
			height: 100%;
		}
	}

	.pp-event-calendar-popup-content {
		flex: 0 0 calc(100% - (15px + var(--pp-event-calendar-popup-image-width, 16.666667%)));
		max-width: calc(100% - (15px + var(--pp-event-calendar-popup-image-width, 16.666667%)));
	}
}

.pp-event-calendar-popup-content {
	padding: 30px;

	h3 {
		margin-top: 0;
		margin-bottom: 15px;
		font-weight: 700;
		font-size: 24px
	}

	.pp-event-calendar-popup-desc {
		margin-bottom: 15px;
		color: #666;
		font-size: 16px;

		p:last-child {
			margin-bottom: 0
		}
	}

	ul,
	ul li {
		display: flex
	}

	ul {
		flex-wrap: wrap;
		column-gap: 15px;
		row-gap: 15px;
		margin: 0 0 15px;
		padding: 0;
		width: 100%;
		list-style: none
	}

	ul li {
		align-items: center;
		position: relative;
		line-height: 1
	}

	.pp-event-calendar-popup-field-icon {
		font-size: 18px;
		margin-right: 5px;
	}

	.pp-event-calendar-event-detail {
		display: flex;
		align-items: center;
		color: #666;
		font-weight: 700;
		font-size: 16px;
		line-height: 1
	}

	svg {
		display: block;
		fill: currentcolor;
		width: auto;
		height: .9em;
	}

	.pp-event-calendar-popup-readmore {
		display: block;
		overflow: hidden
	}

	.pp-event-calendar-popup-readmore .pp-event-calendar-popup-readmore-link {
		display: inline-block
	}
}

.pp-event-calendar-container {

	.fc table {
		overflow: auto;
		margin: auto
	}

	table tbody tr td,
	table tbody tr td:not(.fc-timegrid-slot):not(.fc-timegrid-col),
	table tbody tr th {
		background-color: transparent
	}

	table tbody tr td.fc-day-other {
		background-color: #f9f9f9;
	}

	table tbody tr td.fc-timegrid-slot {
		background-color: 0 0 !important
	}

	.fc-toolbar .fc-button-group {
		flex-wrap: wrap
	}

	.fc-toolbar .fc-button-group .fc-button-primary {
		flex: none
	}

	.fc .fc-daygrid-day.fc-day-today,
	.fc .fc-timegrid-col.fc-day-today {
		background-color: #f5f5f5
	}

	.fc .fc-list-table tr>* {
		border-right: 0 !important;
		border-left: 0 !important
	}

	th.fc-col-header-cell.fc-day {
		padding: 15px;
		background-color: #fff
	}

	.fc .fc-list-table th .fc-list-day-cushion {
		background-color: #fff
	}

	.fc-timegrid-slot-label-cushion.fc-scrollgrid-shrink-cushion,
	.fc-timegrid-axis-cushion.fc-scrollgrid-shrink-cushion.fc-scrollgrid-sync-inner {
		color: #222
	}

	.fc .fc-daygrid-day-top {
		justify-content: flex-start;
		color: #222;
		font-size: 1em
	}

	.fc-daygrid-block-event .fc-event-time,
	.fc-daygrid-block-event .fc-event-title {
		padding: 0
	}

	.fc-daygrid-day-events .fc-daygrid-event.fc-daygrid-block-event,
	.fc-daygrid-day-events .fc-daygrid-event.fc-daygrid-dot-event {
		padding: 10px
	}

	.fc-daygrid-event,
	.fc-timegrid-event {
		border: 0 !important
	}

	.fc-daygrid-event .fc-daygrid-event-dot,
	.fc-list-event .fc-list-event-dot {
		border-color: #fff
	}

	.fc-toolbar.fc-header-toolbar .fc-toolbar-title {
		color: #242424;
		font-size: 1.5em
	}

	.fc-toolbar .fc-button .fc-icon {
		font-size: 1em
	}

	.fc-toolbar .fc-button {
		float: none;
		width: auto;
		height: auto;
		border-radius: 3px;
		background-color: #fff;
		box-shadow: none;
		color: #242424;
		text-transform: capitalize;
		text-shadow: none;
		font-weight: 400;
		font-size: 1em;
	}

	.fc-toolbar .fc-button.fc-state-active,
	.fc-toolbar .fc-button:focus,
	.fc-toolbar .fc-button:hover,
	.fc-toolbar .fc-button:visited {
		background-color: #000;
		box-shadow: none;
		color: #fff
	}

	.fc-toolbar .fc-button.fc-button-active {
		background-color: #000;
		color: #fff
	}
}

span.pp-event-calendar-error-message {
	display: block;
	margin: 5px 0;
	padding: 10px;
	border-left-width: 5px;
	border-left-style: solid;
	border-left-color: #ffb900;
}

@media (max-width:575px) {

	.pp-event-calendar-container .fc-toolbar .fc-toolbar-chunk {
		margin-bottom: 10px;
		width: 100%;
		text-align: center
	}

	.pp-event-calendar-popup-content,
	.pp-event-calendar-popup-image {
		flex: 0 0 100%;
		max-width: 100%
	}

	.pp-event-calendar-popup-body .pp-event-calendar-popup-image {
		margin-right: 0;
		margin-bottom: 15px
	}

	// Stacked: the side-by-side stretch no longer applies, so give the
	// Layout 3 image a definite height instead of collapsing to 0.
	.pp-event-calendar-popup-layout-3 .pp-event-calendar-popup-image {
		height: 180px
	}

	.pp-event-calendar-container .fc-daygrid-day-events .fc-daygrid-event.fc-daygrid-block-event,
	.pp-event-calendar-container .fc-daygrid-day-events .fc-daygrid-event.fc-daygrid-dot-event {
		padding: 0
	}
}
