/**
 * Steveston Heritage — The Events Calendar layer.
 * Loaded only when The Events Calendar is active (see functions.php).
 *
 * TEC (v6, "Views v2") styles everything through --tec-* custom properties
 * declared on :root in common/build/css/variables-*.css. Re-declaring them
 * here, after TEC's stylesheets, maps the calendar onto SHS tokens.
 * TEC prints its variable stylesheets inside <body>, after this file, so the
 * overrides use :root:root (higher specificity) to win regardless of order.
 * Contrast notes are against white.
 */

:root:root {
	/* Accent: teal replaces TEC blue (#334aff). */
	--tec-color-accent-primary: #4a7482;                 /* 5.03:1, white text on it 5.03:1 */
	--tec-color-accent-primary-hover: #3b5d68;
	--tec-color-accent-primary-active: #2e4a53;
	--tec-color-accent-primary-background: #4a748212;
	--tec-color-accent-primary-background-datepicker: #4a748212;
	--tec-color-accent-primary-multiday: #4a74823d;
	--tec-color-accent-primary-multiday-hover: #4a748257;
	--tec-color-accent-primary-week-event: #4a74821a;
	--tec-color-accent-primary-week-event-hover: #4a748233;
	--tec-color-accent-primary-week-event-featured: #4a74820a;
	--tec-color-accent-primary-week-event-featured-hover: #4a748224;
	--tec-color-background-primary-multiday: #4a74823d;
	--tec-color-background-primary-multiday-hover: #4a748257;

	--tec-color-accent-secondary: #333333;
	--tec-color-accent-secondary-hover: #333333cc;
	--tec-color-accent-secondary-active: #333333e6;
	--tec-color-accent-secondary-background: #33333312;

	/* Text */
	--tec-color-text-primary: #333333;                   /* 12.6:1 */
	--tec-color-text-primary-light: #555555;             /* 7.5:1 (TEC default was translucent) */
	--tec-color-text-secondary: #6e6e6e;                 /* 5.1:1 */
	--tec-color-text-events-title: #333333;
	--tec-color-link-primary: #333333;
	--tec-color-link-accent: #4a7482;
	--tec-color-link-accent-hover: #2e4a53;

	/* Icons & borders (non-text: 3:1 minimum where they convey state) */
	--tec-color-icon-primary: #6e6e6e;
	--tec-color-icon-primary-alt: #6e6e6e;
	--tec-color-icon-focus: #4a7482;
	--tec-color-event-icon: #333333;
	--tec-color-event-icon-hover: #4a7482;
	--tec-color-border-default: #c4c4c4;
	--tec-color-border-hover: #6e6e6e;
	--tec-color-border-active: #333333;

	/* Surfaces */
	--tec-color-background-secondary: #f5f5f5;
	--tec-color-background-secondary-hover: #ebebeb;
	--tec-color-background-messages: #4a748212;

	/* Type & shape */
	--tec-font-family-sans-serif: sourcesanspro, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	--tec-border-radius-default: 3px;
}

/* Headings in Lato, like the rest of the site. (Doubled class: TEC's CSS loads later.) */
.tribe-common.tribe-common :is(.tribe-common-h1, .tribe-common-h2, .tribe-common-h3, .tribe-common-h4,
	.tribe-common-h5, .tribe-common-h6, .tribe-common-h7, .tribe-common-h8),
.tribe-events-single-event-title,
.tribe-events-calendar-list__event-title,
.tribe-events-calendar-month__header-column-title {
	font-family: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	font-weight: 700;
}

/* Buttons match SHS buttons. */
.tribe-common.tribe-common .tribe-common-c-btn {
	font-family: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	font-weight: 700;
	border-radius: 3px;
}

.tribe-common.tribe-common .tribe-common-c-btn:hover,
.tribe-common.tribe-common .tribe-common-c-btn:focus-visible {
	background-color: var(--tec-color-accent-primary-hover);
}

/* SHS focus ring inside calendar views (TEC removes outlines on some controls). */
.tribe-common :is(a, button, input, select, [tabindex]):focus-visible {
	outline: 3px solid var(--shs-focus, #1b2a2f) !important;
	outline-offset: 2px;
}

/* Event title links: no underline until hover (titles are headings, not running text). */
.tribe-common.tribe-common .tribe-events-calendar-list__event-title-link,
.tribe-common.tribe-common .tribe-events-calendar-month__calendar-event-title-link {
	text-decoration: none;
}

.tribe-common .tribe-events-calendar-list__event-title-link:hover {
	text-decoration: underline;
}

/* Single event page: same 1200px rhythm as SHS pages. */
.tribe-events-single,
#tribe-events-pg-template {
	max-width: 1200px;
}

/* Featured events use the SHS orange marker instead of TEC blue. */
.tribe-common .tribe-events-calendar-list__event-row--featured .tribe-events-calendar-list__event-date-tag-datetime::after {
	background-color: #c25310;
}
