
/****************************
 * Custom Post Type: Events 
 ****************************/




/* Homepage Events Block */
.gah-events-block {
	padding-top: var(--gah-block-padding);
	padding-bottom: var(--gah-block-padding);
}

.gah-events-block--inner {
	padding: 1.5rem;
	border-radius: var(--theme-button-radius);
	background-color: var(--theme-clr-gah-events-bg);
}

.gah-events-block--inner--header {
	display: flex;
	flex-flow: row wrap;
	justify-content: space-between;
	
	> * {
		flex: 1 0 auto;
		margin-bottom: 2.5rem;
	}

	& .wp-block-button__link {
		display: block;
	}
}

.gah-events-block--inner--list ol {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: stretch;
	margin: 0;
	padding: 0 !important;
	list-style: none;

	> li {
		margin: 0 !important;
		padding: 0 !important;
	}
}

.gah-full-events-list {
	& .gah-full-events-list--inner ol {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	& ol > li {
		margin: 0 0 1.5rem 0;
		padding: 0;
	}

	& .gah-event--teaser {
		& time {
			min-height: 8.5rem;
		}
	}
}

.gah-event--teaser {
	box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.10);
	border-radius: var(--card-radius);
	background-color: var(--white);
	padding: 1.25rem;
	display: block;

	& h4, &.h4 {
		color: var(--theme-clr-dark);
		font-size: 1.25rem;
		line-height: 1.3;
		margin-bottom: 0;
	}

	& time {
		border-radius: calc(var(--card-radius) / 2);
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		padding: 1rem;
		margin-bottom: 1.25rem;

		& span.month {
			font-size: 1.1rem;
			line-height: 1.5;
			text-transform: uppercase;
		}

		& span.day {
			font-size: 2rem;
			font-weight: bold;
			line-height: 1.25;
		}
	}

	& address {
		color: #687785;
		font-size: .875rem;
		line-height: 1.285;
		margin-bottom: 0;

		& span {
			display: block;
		}
	}

	& .gah-event--description {
		margin-top: 1rem;
	}
}


.gah-event-countable {
	&:nth-child(4n) {
		& time {
			background-color: #B5CFD9;
		}
	}
	&:nth-child(4n+1) {
		& time {
			background-color: #F7C14D;
		}
	}
	&:nth-child(4n+2) {
		& time {
			background-color: #4DC496;
		}
	}
	&:nth-child(4n+3) {
		& time {
			background-color: #6CC7E2;
		}
	}	
}

.gah-event--link-wrapper {
	text-decoration: none !important;
	width: 100%;
	height: 100%;
	color: var(--theme-clr-dark);
	transition: transform 0.2s ease, outline 0.2s ease;
	transform: translateY(0);
	outline: 2px solid transparent;
		
	&:hover, &:focus {
		transform: translateY(-2px);
		color: var(--theme-clr-dark) !important;
		outline: 2px solid var(--theme-clr-primary-light-blue);
	}

	> article:not(.gah-event) {
		display: contents;
	}
}

@media only screen and (min-width: 1024px) {
	.gah-events-block--inner--list ol {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 1fr;
	}

	.gah-event--teaser {
		display: flex;
		align-items: stretch;
		gap: 1.25rem;
		
		& time {
			width: 6.25rem;
			margin-bottom: 0;
			flex: 0 0 auto;
		}
	}
}

@media only screen and (min-width: 1024px) {
	.gah-events-block--inner {
		padding: 2.25rem;
	}

	.gah-events-block--inner--header {		
		> * {
			flex: 0 0 auto;
		}

		& .wp-block-button__link {
			display: inline-block;
		}
	}
}


