/*
 * ENS Core X — site-wide responsive guardrails (phones and tablets).
 * Carried over from the old "ENS Core" plugin (0.3.2) so it can be switched off.
 * Each block notes the page or widget it fixes so it can be removed once the
 * underlying Elementor layout is corrected.
 */

/* Paragraphs/headings with a fixed width (e.g. History page, 1000px) never exceed their column. */
.e-paragraph-base,
.e-heading-base {
	max-width: 100%;
}

/* Block-editor "wide" headings (Set Up a Scholarship) stay inside the screen at every width
   (the theme pulls .alignwide 80px past each edge, which made desktops scroll sideways). */
.alignwide {
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

@media (max-width: 1024px) {

	/* Homepage blue bar (mega menu #acef36f): show Donate / Support / Join as
	   always-visible buttons instead of hiding them behind a 20px toggle. */
	.elementor-element-acef36f .e-n-menu-toggle {
		display: none !important;
	}
	.elementor-element-acef36f .e-n-menu-wrapper {
		display: block !important;
		position: static !important;
		width: 100% !important;
		max-height: none !important;
		background: transparent !important;
		box-shadow: none !important;
	}
	.elementor-element-acef36f .e-n-menu-heading {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		justify-content: center !important;
		gap: 4px !important;
		padding: 4px 0 !important;
	}
	.elementor-element-acef36f .e-n-menu-item {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
	}
	.elementor-element-acef36f .e-n-menu-title {
		border: 0 !important;
		background: transparent !important;
		width: 100% !important;
		padding: 0 !important;
	}
	.elementor-element-acef36f .e-n-menu-title-container {
		min-height: 44px;
		width: 100% !important;
		justify-content: center !important;
		padding: 0 6px !important;
		font-size: 15px !important;
		white-space: nowrap;
	}

	/* Header mobile menu: thumb-sized rows and readable submenu text. */
	.tahefobu-mobile-menu-item,
	.tahefobu-mobile-sub-menu-item {
		min-height: 44px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.tahefobu-mobile-sub-menu-item {
		font-size: 15px !important;
	}

	/* Document Portal toolbar wraps instead of running off the screen. */
	.upfp_row {
		flex-wrap: wrap !important;
		max-width: 100% !important;
	}
	.upfp_search {
		max-width: 100% !important;
	}
}

@media (max-width: 767px) {
	/* Larger radio buttons and checkboxes on Formidable forms. */
	.frm_forms input[type="radio"],
	.frm_forms input[type="checkbox"] {
		width: 20px !important;
		height: 20px !important;
	}
}

/* Sticky "Give" button on ENS campaign pages (phones only; scrolls to the gift form). */
.ens-sticky-donate {
	display: none;
}
@media (max-width: 767px) {
	.ens-sticky-donate {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		z-index: 9990;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 52px;
		border: 0;
		border-radius: 10px;
		background: #3d2bbf;
		color: #fff;
		font-size: 17px;
		font-weight: 700;
		letter-spacing: 0.02em;
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
		cursor: pointer;
		transition: opacity 0.2s ease, transform 0.2s ease;
	}
	.ens-sticky-donate[hidden] {
		display: flex;
		opacity: 0;
		transform: translateY(120%);
		pointer-events: none;
	}
	body.ens-has-sticky-donate {
		padding-bottom: 80px;
	}
}
