/**
 * The Events Calendar: its views take their colours and letter from the theme, in light and dark.
 *
 * TEC sets its colours as custom properties on :root; the doubled :root wins without depending on
 * the load order. Until the event blocks replace the TEC views, this keeps them readable and calm.
 *
 * @package DeWittePrins\Theme
 * @since   0.1.0
 */

/*
 * The calendar views use the wide width (templates/archive-events.html). The TEC block ignores its
 * "align" attribute, so the constrained main would hold it to the reading width.
 */
.events-main > .tec-block__archive-events {
	max-width: var(--wp--style--global--wide-size);
}

:root:root {
	--tec-font-family-sans-serif: inherit;
	--tec-font-family-base: inherit;

	--tec-color-text-primary: var(--wp--preset--color--contrast);
	--tec-color-text-primary-light: var(--wp--preset--color--muted);
	--tec-color-text-secondary: var(--wp--preset--color--muted);
	--tec-color-text-disabled: var(--wp--preset--color--muted);
	--tec-color-text-events-title: var(--wp--custom--color--heading);
	--tec-color-text-event-title: var(--wp--custom--color--heading);
	--tec-color-text-event-date: var(--wp--preset--color--contrast);
	--tec-color-text-secondary-event-date: var(--wp--preset--color--muted);

	--tec-color-background: var(--wp--preset--color--base);
	--tec-color-background-secondary: var(--wp--preset--color--soft);
	--tec-color-background-events: var(--wp--preset--color--surface);

	--tec-color-border-default: var(--wp--custom--color--line);
	--tec-color-border-secondary: var(--wp--custom--color--line-strong);
	--tec-color-border-tertiary: var(--wp--custom--color--line);
	--tec-color-border-active: var(--wp--preset--color--accent);

	--tec-color-accent-primary: var(--wp--preset--color--accent);
	--tec-color-accent-primary-hover: var(--wp--custom--color--link);
	--tec-color-accent-primary-active: var(--wp--custom--color--link);
	--tec-color-accent-primary-background: var(--wp--preset--color--tint);
	--tec-color-accent-secondary: var(--wp--preset--color--accent);
	--tec-color-accent-secondary-hover: var(--wp--custom--color--link);
	--tec-color-accent-secondary-active: var(--wp--custom--color--link);
	--tec-color-accent-secondary-background: var(--wp--preset--color--tint);

	--tec-color-link-primary: var(--wp--preset--color--contrast);
	--tec-color-link-accent: var(--wp--custom--color--link);
	--tec-color-link-accent-hover: var(--wp--preset--color--accent);

	--tec-color-button-primary: var(--wp--preset--color--accent);
	--tec-color-button-primary-hover: var(--wp--custom--color--link);
	--tec-color-button-primary-active: var(--wp--custom--color--link);
	--tec-color-button-primary-background: var(--wp--preset--color--tint);
	--tec-color-button-secondary: var(--wp--preset--color--tint);

	--tec-color-icon-primary: var(--wp--preset--color--muted);
	--tec-color-icon-primary-alt: var(--wp--preset--color--muted);
	--tec-color-icon-secondary: var(--wp--preset--color--muted);
	--tec-color-icon-active: var(--wp--preset--color--accent);
	--tec-color-icon-disabled: var(--wp--custom--color--line-strong);

	--tec-color-box-shadow: rgba(0, 0, 0, 0.08);
	--tec-color-box-shadow-secondary: rgba(0, 0, 0, 0.12);
	--tec-color-scroll-track: var(--wp--preset--color--soft);
	--tec-color-scroll-bar: var(--wp--custom--color--line-strong);
}

/* The solid "buy tickets" style button keeps readable text on the accent. */
.tribe-common .tribe-common-c-btn,
.tribe-common a.tribe-common-c-btn {
	color: var(--wp--custom--color--on-accent);
}

/*
 * Price block of a single event: TEC sets the price and its description in black, which vanishes in dark.
 * The price in the text colour, the description muted beside it; the doubled class wins whatever loads last.
 */
.tribe-block__event-price.tribe-block__event-price .tribe-block__event-price__cost {
	color: var(--wp--preset--color--contrast);
}

.tribe-block__event-price.tribe-block__event-price .tribe-block__event-price__description {
	color: var(--wp--preset--color--muted);
}
