/*
 * Site tone "Mixed": light content, dark frame. Loaded only when Customizer > Site tone is Mixed (default).
 * The other stylesheets read design tokens, so a light surface is made by giving the tokens light values:
 *   - on #content for every page except the homepage (body.tv-light-page);
 *   - on single sections of the homepage.
 * Text colours were measured on both --canvas and --panel (4.5:1 or better).
 */

/* =================================================================
 * 1. Light tokens
 * =============================================================== */
:root {
	--light-canvas: #faf6ef; /* warm off-white, from the bone token (#f4efe6) */
	--light-panel: #f1eadd;  /* slightly darker: cards, fields, notices */
	--light-line: #ddd2bf;   /* soft borders */
	--light-text: #171512;   /* ink */
	--light-mute: #5f5a52;
	--light-gold: #7a5600;   /* gold text: #d9a93a is only about 2:1 on light */
	--light-gold-deep: #573c00;
	--light-red: #b80500;    /* small red text (#e10600 is about 4.3:1) */
}

body.tv-light-page #content,
body.tv-light-page > .select2-container,
body.tv-tone-mixed .e-con:is(.tv-products, .tv-story, .tv-service, .tv-seo, .tv-reviews, .tv-blog) {
	--canvas: var(--light-canvas);
	--panel: var(--light-panel);
	--line: var(--light-line);
	--bone: var(--light-text);  /* "main text" */
	--ink: #ffffff;             /* "text on a main-text or gold fill" */
	--mute: var(--light-mute);
	--lede: #3b3731;
	--nav-text: #3b3731;
	--gold: var(--light-gold);
	--gold-soft: var(--light-gold-deep);
	--focus-color: var(--light-gold);
	--e-global-color-text: var(--light-text);
	--e-global-color-secondary: var(--light-text);
	--e-global-color-accent: var(--light-gold);
	background-color: var(--light-canvas);
	color: var(--light-text);
}

html:root body.tv-light-page {
	background-color: var(--light-canvas);
}

/* =================================================================
 * 2. Homepage sections
 * =============================================================== */

/* Boxed sections: paint the light surface to the window edges. */
body.tv-tone-mixed .e-con:is(.tv-products, .tv-reviews, .tv-blog) {
	box-shadow: 0 0 0 100vmax var(--light-canvas);
	clip-path: inset(-1px -100vmax); /* -1px: no dark hairline between neighbouring sections */
}

body.tv-tone-mixed .e-con.tv-lineup {
	--padding-bottom: var(--sp-4xl);
}

body.tv-tone-mixed .e-con.tv-products {
	--padding-bottom: var(--sp-4xl);
}

body.tv-tone-mixed .e-con.tv-tape {
	margin-top: 0;
}

body.tv-tone-mixed .e-con.tv-seo {
	--padding-bottom: var(--sp-2xl);
}

/* Service badges: dark line icons stay dark on light. */
body.tv-tone-mixed .tv-svc .elementor-image-box-img img {
	filter: none;
}

body.tv-tone-mixed .tv-svc .elementor-image-box-img {
	border-color: #d9a93a;
}

/* Product cards (flavor grid and shop loops): white photo area, soft border. */
body.tv-tone-mixed .tv-products .tv-prod__img,
body.tv-light-page #content ul.products li.product .product-loop-image-wrapper {
	background: #ffffff;
}

body.tv-tone-mixed .tv-products .tv-chip {
	border-color: #b9ad97;
}

body.tv-tone-mixed .tv-products .tv-chip:is(:hover, .is-on, [aria-pressed="true"]) {
	border-color: var(--light-text);
}

body.tv-tone-mixed .tv-products a.tv-prod__add.is-added {
	background: #d9a93a;
	color: #070707;
}

/* Blog category label, empty stars, no-image block. */
body.tv-tone-mixed :is(.tv-blog, #content) .tv-post-cat {
	color: var(--light-red);
}

body.tv-tone-mixed .tv-rev__stars-off {
	color: #b9ad97;
}

body.tv-tone-mixed .tv-blog .tv-post-fallback {
	background: #e6dcc9;
}

body.tv-tone-mixed .tv-post-fallback span {
	color: rgba(23, 21, 18, 0.14);
}

/* =================================================================
 * 3. Colours printed by Woostify's customizer CSS, plugins or other files as fixed values
 * =============================================================== */

/* Header stays solid dark over light content. */
html body.tv-tone-mixed #masthead,
html body.tv-tone-mixed #masthead .site-header-inner {
	background: #0d0d0e;
}

/* Single product: Woostify paints the top band #0d0d0e. */
html body.tv-light-page #content .content-top,
html body.tv-light-page #content .product-page-container {
	background-color: var(--light-canvas);
}

html body.tv-light-page #content .woocommerce-tabs ul.tabs li:not(.active) a {
	color: var(--light-mute);
}


/* Old price (Woostify fades it). */
html body.tv-light-page #content .price del,
html body.tv-tone-mixed .tv-products .tv-prod__price del {
	opacity: 1;
}

html body.tv-light-page #content .price del :is(.amount, .woocommerce-Price-amount, bdi, span) {
	opacity: 1;
}

/* Cart table headings. */
html body.tv-light-page #content .woocommerce-cart-form__contents thead th {
	color: var(--light-text);
}

/* Older posts pasted from Google Docs: no white highlight boxes on the off-white page. */
html body.single-post.tv-tone-mixed .elementor-widget-theme-post-content :is(span, p, li, strong, b, em, h2, h3, h4, td)[style*="background"] {
	background-color: transparent !important;
}
