/**
 * Vital Tears — header/footer polish
 * Enqueued by vitaltears-url-fixes.php
 */

/* Provider Portal: icon after label (header + footer icon lists) */
.elementor-icon-list-item a[href*="portal.vitaltears.org"] {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 4px;
}

.elementor-icon-list-item a[href*="portal.vitaltears.org"] .elementor-icon-list-text {
	order: 1;
	/* Elementor adds padding when icon precedes text in DOM (.icon + .text) */
	padding-inline-start: 0 !important;
}

.elementor-icon-list-item a[href*="portal.vitaltears.org"] .elementor-icon-list-icon {
	order: 2;
	padding-inline-end: 0 !important;
	padding-inline-start: 4px !important;
}

.elementor-location-footer .elementor-icon-list-item a[href*="portal.vitaltears.org"] {
	width: 100%;
	justify-content: flex-start;
}

/* Remove dark gap between utility bar and main nav */
.elementor-293.elementor-location-header {
	display: flex;
	flex-direction: column;
	gap: 0;
	row-gap: 0;
}

.elementor-location-header::before {
	display: none !important;
}

.elementor-location-header > .e-con.e-parent {
	margin-block-start: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.elementor-location-header .elementor-element-2c28dc0 {
	margin-bottom: 0 !important;
}

.elementor-location-header .elementor-element-3e333c2,
.elementor-location-header .elementor-element-3e333c2.elementor-sticky__spacer {
	margin-top: -1px !important;
	--margin-top: -1px !important;
	border-top: none !important;
	--border-top-width: 0px !important;
}

.elementor-location-header .elementor-element-3e333c2.elementor-sticky--active {
	/* Elementor sticky_offset is 40px but utility bar is ~39.5px tall */
	top: 39px !important;
}

/* Indigo-ending pages → footer wave (850, 931).
   Theme Builder footer shape is white — white scalloped band on dark-blue last sections
   while the page SVG wave also renders (double wave). Hide footer shape; keep brand
   bottom-wave on the section (fill #262261). page-id selectors work from Elementor CSS. */
body.page-id-850 .elementor-location-footer .elementor-shape-top,
body.page-id-931 .elementor-location-footer .elementor-shape-top,
body.vt-indigo-footer-wave .elementor-location-footer .elementor-shape-top {
	display: none !important;
}

body.page-id-850 .elementor-location-footer,
body.page-id-931 .elementor-location-footer,
body.vt-indigo-footer-wave .elementor-location-footer {
	margin-top: 0 !important;
	position: relative;
	z-index: 1;
}

body.page-id-850 .vt-edu-wave-bottom,
body.vt-indigo-footer-wave .vt-edu-wave-bottom,
body.vt-indigo-footer-wave .vt-wave-bottom__svg {
	display: block !important;
}

body.page-id-850 .vt-edu-wave-bottom path,
body.vt-indigo-footer-wave .vt-edu-wave-bottom path,
body.vt-indigo-footer-wave .vt-wave-bottom__svg {
	fill: #262261 !important;
	color: #262261 !important;
}

body.page-id-850 .elementor-widget-html:has(.vt-edu-wave-bottom),
body.vt-indigo-footer-wave .elementor-widget-html:has(.vt-edu-wave-bottom) {
	display: block !important;
}

body.page-id-850 .elementor-location-footer .elementor-element-1ce570a,
body.page-id-850 .elementor-location-footer .elementor-element-1ce570a > .e-con-inner,
body.page-id-931 .elementor-location-footer .elementor-element-1ce570a,
body.page-id-931 .elementor-location-footer .elementor-element-1ce570a > .e-con-inner,
body.vt-indigo-footer-wave .elementor-location-footer .elementor-element-1ce570a,
body.vt-indigo-footer-wave .elementor-location-footer .elementor-element-1ce570a > .e-con-inner {
	--padding-top: 48px !important;
	--padding-block-start: 48px !important;
	padding-top: 48px !important;
	padding-block-start: 48px !important;
}

@media (max-width: 1024px) {
	body.page-id-850 .elementor-location-footer .elementor-element-1ce570a,
	body.page-id-850 .elementor-location-footer .elementor-element-1ce570a > .e-con-inner,
	body.page-id-931 .elementor-location-footer .elementor-element-1ce570a,
	body.page-id-931 .elementor-location-footer .elementor-element-1ce570a > .e-con-inner,
	body.vt-indigo-footer-wave .elementor-location-footer .elementor-element-1ce570a,
	body.vt-indigo-footer-wave .elementor-location-footer .elementor-element-1ce570a > .e-con-inner {
		--padding-top: 40px !important;
		padding-top: 40px !important;
		padding-block-start: 40px !important;
	}
}

/* Resources / Ask (850): solid indigo base at wave seam (vt-skin .vt-section--indigo pattern). */
body.page-id-850 #ask-a-question {
	position: relative;
	margin-bottom: 0 !important;
	overflow: hidden;
	background-color: #262261 !important;
	background-image: linear-gradient(160deg, #1a184d 0%, #2a388f 55%, #262261 100%) !important;
}

/* Upcoming Events (931): no page SVG — inject brand bottom wave via pseudo-element. */
body.page-id-931 .elementor-element-123fde9 {
	position: relative;
	margin-bottom: 0 !important;
	overflow: hidden;
	background-color: #262261 !important;
	padding-bottom: calc(clamp(64px, 9vw, 120px) + clamp(60px, 8vw, 110px)) !important;
}

body.page-id-931 .elementor-element-123fde9::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 50%;
	width: 165%;
	min-width: 1400px;
	height: clamp(60px, 8vw, 110px);
	transform: translateX(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 184.66 44.96' preserveAspectRatio='none'%3E%3Cpath fill='%23262261' d='M184.66,38.75c-3.16-4.98-8.27-12.59-15.32-19.36C152.95,3.64,133.53-2.68,113.83,1.03c-10.49,1.97-21.62,5.48-32.4,8.89C50.83,19.57,20.4,30.14,0,6.25L0,44.96L184.66,44.96Z'/%3E%3C/svg%3E")
		no-repeat bottom center / 100% 100%;
	pointer-events: none;
	z-index: 5;
}
