/*
 * UX fixes from the Nov 2026 SEO audit (Five by Five). Loaded by lib/ux-fixes.php.
 */

/* ---------- Tap targets (Mobile Experience: MAKE_PAGE_ELEMENTS_EASILY_CLICKABLE) ----------
 * Each control gets a 48x48 tap area. Padding grows the tap area and an equal
 * negative margin keeps the layout where it was, so nothing visibly moves.
 */
@media (max-width: 1024px) {
	/* Banner slider dots: 48x48 button, the 8px dot is drawn by ::before. */
	.ff-banner-slider .slick-dots li {
		flex: 0 0 48px; /* the list items are flex boxes on mobile, capped at 24px */
		width: 48px;
		margin: 0;
	}
	/* The homepage widget sets the dot row's margin itself (auto 12px), so pull the
	   first dot back by 12px: its centre then stays at 24px, where it was. */
	.ff-banner-slider .slick-dots li:first-child {
		margin-left: -12px !important; /* beats the widget's own "li { margin: 0 }" */
	}
	.ff-banner-slider .slick-dots li button,
	.ff-banner-slider .slick-dots li.slick-active button {
		position: relative;
		flex: 0 0 48px;
		width: 48px;
		min-width: 48px;
		height: 48px;
		border: 0;
		border-radius: 0;
		background: transparent;
	}
	.ff-banner-slider .slick-dots li button::before {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		box-sizing: border-box;
		width: 8px;
		height: 8px;
		margin: -4px 0 0 -4px;
		border: 1px solid #fff;
		border-radius: 100%;
	}
	.ff-banner-slider .slick-dots li.slick-active button::before {
		background: #fff;
	}

	/* Mobile menu (hamburger) button: 30x30 -> 48x48. */
	.mobile-menu-trigger-button {
		box-sizing: content-box;
		width: 30px;
		height: 30px;
		padding: 9px;
		margin: -9px;
	}
	.mobile-menu-trigger-button .lines {
		top: 14px;  /* was 5px, + 9px padding */
		right: 9px; /* was 0, + 9px padding */
	}

	/* Header logo link. */
	a.logo-container {
		display: inline-block;
		padding: 15px 4px;
		margin: -15px -4px;
	}

	/* Header phone icon (campus numbers popup). */
	/* The widget caps the link at max-width 25px (border-box), so padding would
	   squeeze the icon. Content-box keeps the icon its own size inside the padding. */
	a.jet-inline-svg {
		box-sizing: content-box;
		max-width: none;
		padding: 9px 12px;
		margin: -9px -12px;
	}
}

/* ---------- Layout shift: blog category dropdown on mobile ----------
 * The blog header's category lists (.blog-nav) are swapped for a "Select
 * Category" dropdown by a script once the page has loaded. Until then the lists
 * took up ~490px and then disappeared, pushing the page up and down. Reserve
 * just the dropdown's height instead: the script's hide() sets an inline
 * display:none, which overrides this, and the 45px dropdown takes the space.
 */
@media (max-width: 767px) {
	.blog-nav {
		display: block;
		height: 45px;
		overflow: hidden;
		visibility: hidden;
	}
}

/* ---------- HubSpot chat, click to load (lib/ux-fixes.php, part 3) ----------
 * Matches HubSpot's own launcher: 60px circle, 16px from the bottom-right
 * corner, same colours and shadow. HubSpot's container sits at z-index 9990.
 */
.tfba-chat-launcher {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9991;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fef2f4;
	color: #33475b;
	box-shadow: rgba(0, 0, 0, 0.1) 0 1px 4px 0, rgba(0, 0, 0, 0.2) 0 2px 12px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease;
}
.tfba-chat-launcher:hover { transform: scale(1.05); }
.tfba-chat-launcher:focus-visible { outline: 2px solid #33475b; outline-offset: 3px; }
.tfba-chat-launcher svg { width: 30px; height: 30px; }
.tfba-chat-launcher.is-loading { cursor: progress; }
.tfba-chat-launcher.is-loading svg { opacity: 0.4; }
@media (prefers-reduced-motion: reduce) { .tfba-chat-launcher { transition: none; } }
