/**
 * Events views - The Events Calendar.
 *
 * Loaded only on event views, from labcritics_enqueue_events_styles() in
 * inc/events.php. Two jobs:
 *
 *   1. Style the theme's tribe-events/single-event.php override (.lc-event*).
 *   2. Pull the plugin's Views V2 list/month markup back toward the design
 *      language the About and Advertise pages established - green accent,
 *      pill eyebrows, 1px #cfe9df hairlines, tight-tracking headings.
 *
 * The plugin ships its own stylesheets and wins on specificity in places, so
 * the Views V2 section leans on the plugin's own class names rather than
 * !important where it can. Class names under tribe-events-calendar-* have been
 * stable across the whole Views V2 line.
 */

/* -----------------------------------------------------------------------------
 * 1.0 Page shell
 *
 * Events render inside page-templates/template-events.php, whose .aboutus-new
 * wrapper is a floated legacy card at 80% font size. The About page redesign
 * neutralised the same wrapper; this does it for events.
 * -------------------------------------------------------------------------- */

.aboutus-new.events {
	float: none;
	width: auto;
	max-width: 1180px;
	margin: 10px auto;
	padding-bottom: 12px;
	font-size: 100%;
	border-color: #e6ece9;
	display: flow-root;
}

.aboutus-new.events .aboutus-text {
	padding: 0 28px 28px;
}

.aboutus-new.events .aboutus-head {
	margin: 0 28px;
	width: auto;
	padding: 26px 0 18px;
	border-bottom: 1px solid #e3e8e6;
}

.aboutus-new.events .aboutus-head h1 {
	color: var(--lc-green-dark);
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.aboutus-new.events .aboutus-head p:empty {
	display: none;
}

/* The single event supplies its own <h1>; the wrapper's "Events" heading is
   suppressed in the template so there is no second one. Nothing to do here. */


/* -----------------------------------------------------------------------------
 * 2.0 Single event - hero
 * -------------------------------------------------------------------------- */

.lc-event {
	color: #2f3a42;
}

.lc-event__back {
	margin: 18px 0 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.lc-event__back a {
	color: #5a6b65;
	text-decoration: none;
}

.lc-event__back a:hover,
.lc-event__back a:focus {
	color: var(--lc-green);
}

.lc-event__hero {
	padding: 14px 0 24px;
	border-bottom: 1px solid #e3e8e6;
	margin-bottom: 28px;
}

.lc-event__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--lc-green);
}

.lc-event__eyebrow-sep {
	color: #a9bcb4;
}

.lc-event__eyebrow-place {
	color: #5a6b65;
}

.lc-event__badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px solid #cfe9df;
	background: var(--lc-green-tint);
	font-size: 11px;
	letter-spacing: 0.12em;
}

.lc-event__badge--past {
	border-color: #e2e2e2;
	background: #f4f5f5;
	color: #6d7671;
}

.lc-event__title,
.lc-event .tribe-events-single-event-title {
	max-width: 20em;
	margin: 0;
	color: var(--lc-green-dark);
	font-size: 38px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

/* Past events read as archive material rather than something to sign up for. */
.lc-event--past .lc-event__title {
	color: #46534d;
}


/* -----------------------------------------------------------------------------
 * 3.0 Single event - body grid
 * -------------------------------------------------------------------------- */

.lc-event__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 38px;
	align-items: start;
}

.lc-event__main {
	min-width: 0;
}

.lc-event__main .tribe-events-event-image,
.lc-event__main img {
	max-width: 100%;
	height: auto;
}

.lc-event__main .tribe-events-event-image {
	margin: 0 0 24px;
	border-radius: 6px;
	overflow: hidden;
}

.lc-event__description {
	font-size: 16px;
	line-height: 1.7;
	color: #2f3a42;
}

.lc-event__description > *:first-child {
	margin-top: 0;
}

.lc-event__description p {
	margin: 0 0 16px;
	max-width: 72ch;
}

.lc-event__description h2 {
	margin: 32px 0 12px;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--lc-green-dark);
}

.lc-event__description h3 {
	margin: 26px 0 10px;
	font-size: 18px;
	font-weight: 700;
	color: var(--lc-green-dark);
}

.lc-event__description ul,
.lc-event__description ol {
	margin: 0 0 18px 1.1em;
	padding: 0;
}

.lc-event__description li {
	margin-bottom: 7px;
}


/* -----------------------------------------------------------------------------
 * 4.0 Single event - details card
 * -------------------------------------------------------------------------- */

.lc-event__aside {
	min-width: 0;
	position: sticky;
	top: 24px;
}

.lc-event__card {
	padding: 20px 20px 22px;
	border: 1px solid #cfe9df;
	border-radius: 8px;
	background:
		radial-gradient(120% 160% at 90% 0%, rgba(2, 195, 154, 0.14) 0%, rgba(2, 195, 154, 0) 62%),
		linear-gradient(150deg, #f7fcfa 0%, #eef7f3 100%);
}

.lc-event__card-title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5a6b65;
}

.lc-event__facts {
	margin: 0;
}

.lc-event__fact {
	padding: 11px 0;
	border-top: 1px solid #d9ece3;
}

.lc-event__fact:first-child {
	border-top: 0;
	padding-top: 0;
}

.lc-event__fact dt {
	margin: 0 0 3px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6a7c75;
}

.lc-event__fact dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.45;
	color: var(--lc-green-dark);
	font-weight: 600;
}

.lc-event__fact-note {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	font-weight: 400;
	color: #5f706a;
}

.lc-event__venue-name {
	display: block;
}

.lc-event__address,
.lc-event__fact .tribe-events-address {
	display: block;
	margin-top: 3px;
	font-size: 13.5px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.5;
	color: #5f706a;
}

.lc-event__fact .tribe-events-gmap {
	display: inline-block;
	margin-top: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--lc-green);
	text-decoration: none;
}

.lc-event__fact .tribe-events-gmap:hover,
.lc-event__fact .tribe-events-gmap:focus {
	text-decoration: underline;
}

.lc-event__cats {
	font-weight: 400 !important;
	font-size: 14px !important;
}

.lc-event__cats a {
	color: var(--lc-green);
	text-decoration: none;
}

.lc-event__cats a:hover,
.lc-event__cats a:focus {
	text-decoration: underline;
}

/* Primary call to action. The plugin buried the event's own URL as a raw link
   at the bottom of a definition list; on a listings site it is the single most
   clicked thing on the page. */
.lc-event__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	padding: 13px 18px;
	border-radius: 6px;
	background: var(--lc-green);
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color .18s ease, transform .18s ease;
}

.lc-event__cta:hover,
.lc-event__cta:focus {
	background: #088d5d;
	color: #fff !important;
	text-decoration: none;
	transform: translateY(-1px);
}

.lc-event--past .lc-event__cta {
	background: #5f706a;
}

.lc-event--past .lc-event__cta:hover,
.lc-event--past .lc-event__cta:focus {
	background: #4b5a55;
}

/* Add to Calendar dropdown, relocated into the card by the template override. */
.lc-event__card .tribe-events-c-subscribe-dropdown__container {
	margin-top: 10px;
	justify-content: stretch;
}

.lc-event__card .tribe-events-c-subscribe-dropdown {
	width: 100%;
}

.lc-event__card .tribe-events-c-subscribe-dropdown__button {
	width: 100%;
	justify-content: center;
	border-radius: 6px;
	border-color: #cfe9df;
	background: #fff;
}

.lc-event__map {
	margin-top: 16px;
	border: 1px solid #cfe9df;
	border-radius: 8px;
	overflow: hidden;
}

.lc-event__map > div {
	height: 240px !important;
}

/* Organizer block still comes from the plugin partial. */
.lc-event__aside .tribe-events-meta-group {
	margin-top: 16px;
	padding: 18px 20px;
	border: 1px solid #e3e8e6;
	border-radius: 8px;
	background: #fff;
	width: auto;
	float: none;
}

.lc-event__aside .tribe-events-single-section-title {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5a6b65;
}


/* -----------------------------------------------------------------------------
 * 5.0 Single event - prev/next
 *
 * Moved out of the middle of the page (the plugin renders this nav twice, above
 * the description and again at the foot); the override keeps only the footer.
 * -------------------------------------------------------------------------- */

.lc-event__nav {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid #e3e8e6;
}

.lc-event__nav .tribe-events-sub-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: space-between;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lc-event__nav .tribe-events-sub-nav li {
	margin: 0;
	max-width: 46%;
	list-style: none;
}

.lc-event__nav .tribe-events-nav-next {
	text-align: right;
	margin-left: auto;
}

.lc-event__nav .tribe-events-sub-nav a {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #3f544c;
	text-decoration: none;
}

.lc-event__nav .tribe-events-sub-nav a:hover,
.lc-event__nav .tribe-events-sub-nav a:focus {
	color: var(--lc-green);
}


/* -----------------------------------------------------------------------------
 * 6.0 Views V2 - design tokens
 *
 * The plugin drives its whole colour system from CSS custom properties, so
 * repointing those recolours the buttons, links, focus rings, datepicker and
 * month grid in one move. That is much more durable than out-specifying the
 * plugin's own selectors, which are rewritten between releases - and it is the
 * difference between the search button coming out Labcritics green and coming
 * out The Events Calendar's stock indigo.
 * -------------------------------------------------------------------------- */

:root,
.tribe-common,
.tribe-events {
	--tec-color-accent-primary: var(--lc-green);
	--tec-color-accent-primary-hover: #088d5d;
	--tec-color-accent-primary-active: #077a51;
	--tec-color-accent-primary-background: rgba(10, 166, 110, 0.07);
	--tec-color-accent-primary-background-datepicker: rgba(10, 166, 110, 0.07);
	--tec-color-accent-primary-week-event: rgba(10, 166, 110, 0.10);
	--tec-color-accent-primary-week-event-hover: rgba(10, 166, 110, 0.20);
	--tec-color-accent-primary-week-event-featured: rgba(10, 166, 110, 0.05);
	--tec-color-accent-primary-week-event-featured-hover: rgba(10, 166, 110, 0.14);

	--tec-color-link-accent: var(--lc-green);
	--tec-color-link-accent-hover: #088d5d;

	--tec-color-text-primary: var(--lc-green-dark);
	--tec-color-text-secondary: #5a6b65;

	--tec-color-border-default: #dfe6e3;
	--tec-color-border-secondary: #e6ece9;

	--tec-border-radius-default: 6px;
}


/* -----------------------------------------------------------------------------
 * 7.0 Views V2 - list view
 * -------------------------------------------------------------------------- */

.tribe-events .tribe-events-l-container,
.tribe-common .tribe-common-l-container {
	padding-top: 18px;
	padding-bottom: 18px;
}

/* Search / view-switcher bar */
.tribe-events .tribe-events-c-events-bar {
	border: 1px solid #e3e8e6;
	border-radius: 8px;
	background: #fbfdfc;
	padding: 10px;
}

.tribe-events .tribe-events-c-search__button,
.tribe-common .tribe-common-c-btn {
	border-radius: 6px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

/* Month separators become quiet section rules instead of loud headings. */
.tribe-events-calendar-list__month-separator {
	margin: 30px 0 14px;
	border-top: 1px solid #e3e8e6;
	padding-top: 14px;
}

.tribe-events-calendar-list__month-separator:first-child {
	margin-top: 6px;
	border-top: 0;
	padding-top: 0;
}

/* The plugin draws a rule to the right of the label with :after; it now sits on
   top of the section's own border, so drop it. */
.tribe-events .tribe-events-calendar-list__month-separator:after {
	display: none;
}

.tribe-events-calendar-list__month-separator-text {
	color: #5a6b65;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background: transparent;
	padding: 0;
}

/* Each event becomes a card rather than a flat row. */
.tribe-events-calendar-list__event-row {
	margin-bottom: 14px;
	padding: 16px;
	border: 1px solid #e6ece9;
	border-radius: 8px;
	background: #fff;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tribe-events-calendar-list__event-row:hover {
	border-color: #cfe9df;
	box-shadow: 0 6px 18px rgba(15, 31, 26, 0.07);
	transform: translateY(-1px);
}

.tribe-events-calendar-list__event-row--featured .tribe-events-calendar-list__event-date-tag-daynum {
	background: var(--lc-green);
}

/* Date chip on the left. The row is a flex container, so without an explicit
   align-self the date column stretches to the full row height and the chip
   renders as a tall bar rather than a chip. */
.tribe-events .tribe-events-calendar-list__event-date-tag {
	align-self: flex-start;
	padding-right: 16px;
}

.tribe-events .tribe-events-calendar-list__event-date-tag-datetime {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 62px;
	padding: 9px 6px;
	border: 1px solid #cfe9df;
	border-radius: 8px;
	background: var(--lc-green-tint);
}

.tribe-events-calendar-list__event-date-tag-weekday {
	color: var(--lc-green);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.tribe-events-calendar-list__event-date-tag-daynum {
	color: var(--lc-green-dark);
	font-size: 25px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

/* Title, date line, venue */
.tribe-events-calendar-list__event-datetime {
	color: #5a6b65;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tribe-events-calendar-list__event-title {
	margin: 4px 0 5px;
	font-size: 19px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.tribe-events-calendar-list__event-title-link,
.tribe-events-calendar-list__event-title-link:visited {
	color: var(--lc-green-dark);
	text-decoration: none;
	border-bottom: 0;
}

.tribe-events-calendar-list__event-title-link:hover,
.tribe-events-calendar-list__event-title-link:focus {
	color: var(--lc-green);
	text-decoration: none;
}

.tribe-events-calendar-list__event-venue {
	margin: 0 0 6px;
	font-size: 13.5px;
	font-style: normal;
	line-height: 1.5;
	color: #5f706a;
}

.tribe-events-calendar-list__event-venue-title {
	color: #3f544c;
	font-weight: 700;
}

.tribe-events-calendar-list__event-venue-address {
	color: #77857f;
}

.tribe-events-calendar-list__event-description {
	font-size: 14.5px;
	line-height: 1.6;
	color: #55635d;
}

.tribe-events-calendar-list__event-description p {
	margin: 0;
}

/* Featured image. The plugin splits the row 5/8 text to 3/8 image, which on a
   wide column leaves a band of dead space beside a thumbnail that is usually
   much smaller than its slot. Cap the image column and let the text take the
   rest. */
.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list__event-featured-image-wrapper {
	width: 200px;
	flex: 0 0 auto;
}

.tribe-common--breakpoint-medium.tribe-events .tribe-events-calendar-list__event-details {
	width: auto;
	flex: 1 1 auto;
	min-width: 0;
}

/* Thumbnails arrive at wildly different aspect ratios from the uploads
   library; a fixed ratio keeps the rows from jumping around. */
.tribe-events .tribe-events-calendar-list__event-featured-image {
	width: 100%;
	max-width: 180px;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #eceeed;
}

/* Cost chip */
.tribe-events .tribe-events-c-small-cta__price {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid #cfe9df;
	border-radius: 999px;
	background: var(--lc-green-tint);
	color: var(--lc-green);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}


/* -----------------------------------------------------------------------------
 * 8.0 Views V2 - month view
 * -------------------------------------------------------------------------- */

.tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-daynum {
	background-color: var(--lc-green);
	color: #fff;
}

.tribe-events-calendar-month__calendar-event-title-link,
.tribe-events-calendar-month__calendar-event-title-link:visited {
	color: var(--lc-green-dark);
}

.tribe-events-calendar-month__calendar-event-title-link:hover,
.tribe-events-calendar-month__calendar-event-title-link:focus {
	color: var(--lc-green);
}

.tribe-events-calendar-month__calendar-event-datetime {
	color: #5f706a;
}

.tribe-events-calendar-month__day-cell--selected,
.tribe-events-calendar-month__day--selected {
	background-color: var(--lc-green-tint);
}

.tribe-events-calendar-month__multiday-event-bar-inner {
	background-color: #d7efe5;
}

.tribe-events-calendar-month__multiday-event-bar-title {
	color: var(--lc-green-dark);
}


/* -----------------------------------------------------------------------------
 * 9.0 Responsive
 * -------------------------------------------------------------------------- */

@media screen and (max-width: 1000px) {
	.lc-event__body {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.lc-event__aside {
		position: static;
	}

	/* Details ahead of the write-up on a phone: dates, place and the register
	   link are what a reader scrolling a conference listing wants first. */
	.lc-event__main {
		order: 2;
	}

	.lc-event__aside {
		order: 1;
	}
}

@media screen and (max-width: 782px) {
	.aboutus-new.events .aboutus-text {
		padding: 0 16px 20px;
	}

	.aboutus-new.events .aboutus-head {
		margin: 0 16px;
		padding: 20px 0 14px;
	}

	.aboutus-new.events .aboutus-head h1 {
		font-size: 26px;
	}

	.lc-event__title,
	.lc-event .tribe-events-single-event-title {
		font-size: 28px;
	}

	.lc-event__hero {
		padding: 12px 0 18px;
		margin-bottom: 22px;
	}

	.lc-event__eyebrow {
		font-size: 11px;
		letter-spacing: 0.08em;
	}

	.tribe-events-calendar-list__event-row {
		padding: 13px;
	}

	.tribe-events-calendar-list__event-title {
		font-size: 17px;
	}

	.tribe-events-calendar-list__event-featured-image {
		width: 76px;
		height: 58px;
	}

	.lc-event__nav .tribe-events-sub-nav li {
		max-width: 100%;
		flex: 1 1 100%;
	}

	.lc-event__nav .tribe-events-nav-next {
		text-align: left;
	}
}
