/**
 * Loaded only when Elementor is active.
 *
 * Non-invasive helpers that let Elementor cooperate with the Pharma Uno
 * Akademie theme. This file deliberately does NOT override Elementor widget
 * internals. It only:
 *   1. Mirrors the theme design tokens onto Elementor containers as a
 *      convenience, so sections that use .pua- utility classes render with
 *      the correct navy/gold palette (nothing is imported here).
 *   2. Ensures Full-Width / Canvas templates go edge-to-edge (the theme
 *      wrappers must never constrain an Elementor container).
 *   3. Provides a .pua-btn helper usable inside an Elementor HTML / Button
 *      widget.
 *   4. Adds tiny fixes so the theme-builder header / footer locations sit
 *      flush against the viewport.
 *
 * Keep this file small, defensive and low-specificity.
 *
 * @package Pharma_Uno_Akademie
 * @since   1.0.0
 */

/* =====================================================================
   1. Token convenience — expose the theme tokens on Elementor scopes.
   These are the same values declared in style.css :root; re-declaring
   them here means a .pua- utility placed inside an Elementor widget
   resolves correctly even in isolated editor previews. No import needed.
   ===================================================================== */
.elementor,
.elementor-section,
.elementor-container,
.e-con,
.e-con-inner {
	--pua-navy: #0D1B3E;
	--pua-navy-2: #132552;
	--pua-navy-3: #182F66;
	--pua-gold: #F0A800;
	--pua-gold-light: #FFC845;
	--pua-white: #FFFFFF;
	--pua-bg-light: #F4F6FA;
	--pua-bg-card: #FFFFFF;
	--pua-text-dark: #14213D;
	--pua-text-muted: #5B6478;
	--pua-border: #E2E6F0;
	--pua-radius: 14px;
	--pua-maxw: 1180px;
	--pua-shadow: 0 10px 30px rgba(13, 27, 62, .08);
	--pua-font-head: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
	--pua-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* =====================================================================
   2. Full-Width / Canvas edge-to-edge — never let the theme main
   wrapper add horizontal padding or a max-width around Elementor.
   Scoped to the Elementor page templates so normal theme pages keep
   their gutters.
   ===================================================================== */
.elementor-template-full-width .pua-site-main,
.elementor-page .pua-site-main.elementor-full-width,
.page-template-elementor_canvas .pua-site-main,
.elementor-template-canvas .pua-site-main {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}

/* When an Elementor section/container declares stretched width, allow it
   to break out of any residual wrapper without theme interference. */
.pua-site-main .elementor-section.elementor-section-stretched,
.pua-site-main .e-con.e-con-full,
.pua-site-main > .elementor {
	max-width: 100%;
}

/* Elementor manages its own boxed width via .elementor-section-boxed /
   container settings — make sure the theme does not double-constrain it. */
.pua-site-main > .elementor .elementor-section.elementor-section-boxed > .elementor-container,
.pua-site-main > .elementor .e-con.e-con-boxed > .e-con-inner {
	max-width: var(--pua-maxw);
}

/* =====================================================================
   3. .pua-btn helper — usable inside an Elementor HTML or Button widget.
   Mirrors the theme primary/secondary/outline button system so authors
   can drop a themed pill button into any Elementor widget.
   ===================================================================== */
/* Scoped to .elementor ONLY. A bare `a.pua-btn` selector would outrank the
   theme's single-class variant rules (.pua-btn--outline etc.) on every page
   as soon as Elementor is active — never widen this scope. */
.elementor .pua-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	border: 2px solid transparent;
	font-family: var(--pua-font-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	min-height: 44px;
	background: var(--pua-gold);
	color: var(--pua-navy);
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.elementor .pua-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(240, 168, 0, .35);
	background: var(--pua-gold-light);
	color: var(--pua-navy);
}

.elementor .pua-btn.pua-btn--primary {
	background: var(--pua-gold);
	color: var(--pua-navy);
}

.elementor .pua-btn.pua-btn--secondary {
	background: transparent;
	color: var(--pua-white);
	border-color: rgba(255, 255, 255, .5);
}

.elementor .pua-btn.pua-btn--secondary:hover {
	background: rgba(255, 255, 255, .08);
	border-color: var(--pua-white);
	color: var(--pua-white);
	box-shadow: none;
}

.elementor .pua-btn.pua-btn--outline {
	background: transparent;
	color: var(--pua-navy);
	border-color: var(--pua-navy);
}

.elementor .pua-btn.pua-btn--outline:hover {
	background: var(--pua-navy);
	color: var(--pua-white);
	border-color: var(--pua-navy);
	box-shadow: none;
}

.elementor .pua-btn.pua-btn--block {
	width: 100%;
}

.elementor .pua-btn:focus-visible {
	outline: 2px solid var(--pua-gold) !important;
	outline-offset: 3px;
}

/* =====================================================================
   4. Theme-builder header / footer locations sit flush.
   When Elementor renders the header/footer via elementor_theme_do_location,
   remove any stray theme spacing so the builder output aligns to the edges.
   ===================================================================== */
.pua-site-main > .elementor-location-header,
.elementor-location-header {
	margin: 0;
}

.elementor-location-footer {
	margin: 0;
}

/* Keep the sticky theme-builder header above theme content without the
   theme adding its own offset. */
.elementor-location-header .elementor-sticky--active {
	z-index: 1000;
}

/* Ensure a builder header/footer spans full width regardless of the theme
   content wrapper. */
.elementor-location-header > .elementor,
.elementor-location-footer > .elementor {
	width: 100%;
	max-width: 100%;
}

/* Prevent the theme body typography from leaking a bottom margin onto the
   first/last Elementor location when it directly follows the skip link or
   precedes nothing. Defensive, low specificity. */
body > .elementor-location-header:first-of-type {
	margin-top: 0;
}
