/* Barnsley Singers: events (theme 1.6). */

/* The Events Calendar's fonts and colours are set in Customise > The Events Calendar
   (font: inherit theme fonts, accent and links #BD1522, titles and dates #1A1A1A). */

/* Event titles and headings in Josefin capitals, like the rest of the site. */
.tribe-events .tribe-events-calendar-list__event-title,
.tribe-events .tribe-events-calendar-month__calendar-event-title,
.tribe-events .tribe-events-calendar-list__month-separator-text,
.tribe-events .tribe-events-header__title-text,
.tribe-events-single .tribe-events-single-event-title,
.tribe-events-single .tribe-events-single-section-title {
	font-family: var(--wp--preset--font-family--heading, inherit) !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
}

/* Calendar pages: the theme's <main> already adds space below the header. */
body .tribe-common .tribe-common-l-container {
	padding-top: 0 !important;
}
body .tec-block__archive-events,
body .tec-block__single-event {
	margin-top: 0;
}

/* "Book tickets" on a single event. */
.bs-event-tickets {
	margin-top: 2rem;
}
.bs-event-tickets__note {
	margin-top: 0.6rem;
	color: var(--wp--preset--color--secondary, #4A4A4A);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
}

/* Next event block: photo beside the details, stacking on phones. */
.bs-next-event {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2rem 3rem;
	align-items: center;
}
.bs-next-event:not(:has(.bs-next-event__photo)) {
	grid-template-columns: minmax(0, 1fr);
}
.bs-next-event__photo {
	margin: 0;
}
.bs-next-event__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.bs-next-event__body > * {
	margin-block: 0;
}
.bs-next-event__label {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 600;
}
.bs-next-event .bs-next-event__title {
	margin-top: 0.5rem !important;
}
.bs-next-event .bs-next-event__title a {
	color: inherit;
	text-decoration: none;
}
.bs-next-event .bs-next-event__title a:hover,
.bs-next-event .bs-next-event__title a:focus-visible {
	text-decoration: underline;
}
.bs-next-event__date {
	margin-top: 1rem !important;
	color: var(--wp--preset--color--red, #BD1522);
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	font-weight: 600;
}
.bs-next-event__venue {
	margin-top: 0.25rem !important;
	font-weight: 600;
}
.bs-next-event__intro {
	margin-top: 0.75rem !important;
}
.bs-next-event .wp-block-buttons,
.bs-event-tickets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem !important;
}
.bs-next-event .wp-block-buttons {
	margin-top: 1.5rem !important;
}
@media (max-width: 781px) {
	.bs-next-event {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Members' diary (1.6.1). */
.bs-diary__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.bs-diary__month {
	margin: 2rem 0 0.5rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--wp--preset--color--red, #BD1522);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.bs-diary__month:first-child {
	margin-top: 0;
}
.bs-diary__item {
	display: grid;
	grid-template-columns: 13.5rem minmax(0, 1fr);
	gap: 0.25rem 1.25rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule, #DCDCDC);
}
.bs-diary__item > *,
.bs-diary__what > * {
	margin: 0;
}
.bs-diary__when {
	font-weight: 600;
}
.bs-diary__title {
	font-weight: 600;
}
.bs-diary__badge {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.05rem 0.45rem;
	background: #000;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: 0.15em;
}
.bs-diary__venue,
.bs-diary__notes {
	color: var(--wp--preset--color--secondary, #4A4A4A);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
}
@media (max-width: 600px) {
	.bs-diary__item {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Members' diary: members' details from the Barnsley Singers Blocks plugin (1.6.2). */
.bs-diary__members {
	margin-top: 0.6rem !important;
	padding: 0.6rem 0.85rem;
	border-left: 3px solid var(--wp--preset--color--red, #BD1522);
	background: var(--wp--preset--color--paper, #F6F4F1);
	font-size: 0.95em;
}
.bs-members-details {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
}
.bs-members-details > div {
	display: flex;
	gap: 0.4rem;
}
.bs-members-details dt {
	font-weight: 700;
}
.bs-members-details dt::after {
	content: ":";
}
.bs-members-details dd {
	margin: 0;
}
.bs-members-details a,
.bs-members-notes a {
	color: var(--wp--preset--color--red, #BD1522);
}
.bs-members-notes {
	margin-top: 0.4rem;
}
.bs-members-notes p {
	margin: 0 0 0.4rem;
}
.bs-members-notes p:last-child {
	margin-bottom: 0;
}

/* List view: an image for every event, between the date and the text,
   fading into the text like the profile bands (1.6.8). Events without a
   featured image show the Barnsley Singers placeholder. */
body .tribe-events .tribe-events-calendar-list__event-featured-image-wrapper {
	margin: 0 0 1rem;
	padding: 0;
}
body .tribe-events .tribe-events-calendar-list__event-featured-image-link {
	display: block;
	height: 100%;
}
body .tribe-events .tribe-events-calendar-list__event-featured-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: center 30%;
	-webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
body .tribe-events .is-placeholder .tribe-events-calendar-list__event-featured-image {
	object-position: center;
}
body .tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list__event {
	flex-direction: row;
	align-items: stretch;
}
body .tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list__event-featured-image-wrapper {
	flex: 0 0 34%;
	max-width: 34%;
	margin: 0 2rem 0 0;
}
body .tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list__event-featured-image {
	height: 100%;
	min-height: 11rem;
	-webkit-mask-image: linear-gradient(to right, #000 55%, transparent 100%);
	mask-image: linear-gradient(to right, #000 55%, transparent 100%);
}
body .tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list__event-details {
	flex: 1 1 auto;
	max-width: none;
	padding-left: 0;
}

/* Single event: featured image (1.7.0). Never wider than the column. On wider
   screens it sits beside the description, fading into the text, and stays in
   view while a long description scrolls. The theme wraps the image,
   description and "Add to calendar" in .bs-event-intro, so the image stops
   before the event details. On phones it sits above the text at its own
   shape, fading at the bottom. Events without a featured image show none. */
body .tribe-events-single .tribe-events-event-image {
	margin: 0 0 1.5rem;
	text-align: left;
}
body .tribe-events-single .tribe-events-event-image img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: 66vh;
	object-fit: cover;
	object-position: center top;
	-webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
@media (min-width: 782px) {
	/* The calendar clips this box (overflow: hidden), which stops sticky positioning. */
	body .tribe-events-single > .type-tribe_events:has(> .bs-event-intro) {
		overflow: visible;
	}
	body .tribe-events-single .bs-event-intro {
		display: grid;
		grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
		grid-auto-rows: auto;
		column-gap: 2.5rem;
		align-items: start;
		margin-bottom: 1.5rem;
	}
	body .tribe-events-single .bs-event-intro > * {
		grid-column: 2;
	}
	body .tribe-events-single .bs-event-intro > .tribe-events-event-image {
		grid-column: 1;
		grid-row: 1 / span 20;
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 6rem);
		margin: 0;
	}
	body .tribe-events-single .bs-event-intro .tribe-events-event-image img {
		max-height: calc(100vh - 9rem);
		-webkit-mask-image: linear-gradient(to right, #000 70%, transparent 100%);
		mask-image: linear-gradient(to right, #000 70%, transparent 100%);
	}
}
