/*
Theme Name: Salsa With Silvia
Description: Salsa With Silvia
Author:
Author URI:
Template: Avada
Version: 1.1.0
Text Domain:  Avada
*/

/* -------------------------------------------------------------------------
 * CLS fix: reserve space for YouTube facade players before their JS loads.
 *
 * <lite-youtube> is a custom element; until Avada's lite-yt script upgrades
 * it the browser gives it NO box (custom elements default to display:inline).
 * When the script lands, a full-size player appears and shifts everything
 * below it — measured at 0.39+ layout-shift on the production homepage
 * (lighthouse-live/BASELINE.md §3b). Reserving the box at first paint
 * eliminates the shift on every device.
 * ---------------------------------------------------------------------- */
lite-youtube {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #000;
}

/* Avada wraps the facade in .fusion-video with --awb-max-width/height vars;
 * honor the configured max width so the reserved box matches the final one. */
.fusion-video.fusion-youtube {
	display: block;
	width: 100%;
	max-width: var(--awb-max-width, 100%);
	margin-left: auto;
	margin-right: auto;
}

/* Font-display overrides live in inc/performance.php (sws_font_display_optional)
 * — they must print AFTER Avada's compiled CSS to win the @font-face cascade,
 * and this stylesheet loads BEFORE it (verified on staging 2026-07-23). */

/* -------------------------------------------------------------------------
 * WellnessLiving widget placeholders (pairs with js/sws-wl-loader.js).
 * Before their module upgrades them, <wl-*> custom elements have no box.
 * Reserve approximate space + show a quiet loading line so the area reads
 * as "loading" rather than missing, and content below doesn't jump when
 * the widget boots. Heights are conservative under-estimates of the real
 * widgets (schedule ~700px+, form ~500px) to keep any settle-shift small.
 * :defined flips false->true when the custom element upgrades.
 * ---------------------------------------------------------------------- */
wl-schedule-widget:not(:defined),
wl-appointments-widget:not(:defined) {
	display: block;
	min-height: 480px;
	position: relative;
}
wl-lead-capture-widget:not(:defined) {
	display: block;
	min-height: 320px;
	position: relative;
}
wl-schedule-widget:not(:defined)::before,
wl-appointments-widget:not(:defined)::before,
wl-lead-capture-widget:not(:defined)::before {
	content: 'Loading live schedule\2026';
	position: absolute;
	top: 40px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 15px;
	opacity: 0.55;
}
wl-lead-capture-widget:not(:defined)::before {
	content: 'Loading signup form\2026';
}
wl-appointments-widget:not(:defined)::before {
	content: 'Loading appointment booking\2026';
}
