/* #Media Queries - global (block-level breakpoints live in each block's CSS)
================================================== */

/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {
}

/* Medium Devices, Desktops - mobile navigation */
@media only screen and (max-width : 991.98px) {
	/* Phones/tablets: logo left, temperature + time stacked right (menu button floats bottom-right) */
	.pi-header__inner {
		grid-template-columns: auto 1fr;
		gap: 16px;
		min-height: 80px;
		padding-block: 16px;
	}

	.pi-header__meta {
		grid-column: 2;
		justify-self: end;
		font-size: clamp(16px, 4.6vw, 19px);
		line-height: 1.12;
	}

	/* Desktop nav hides; the mobile menu (style.css > Mobile menu) takes over */
	.pi-nav {
		display: none;
	}

	.pi-header.is-scrolled .pi-header__inner {
		min-height: 80px;
		padding-block: 16px;
	}

	.pi-header.is-scrolled .pi-header__logo {
		width: clamp(48px, 3.5vw, 60px);
		height: clamp(48px, 3.5vw, 60px);
	}

	.pi-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Small Devices, Tablets */
@media only screen and (max-width : 767.98px) {
	.gform_wrapper .gfield--width-half,
	.gform_wrapper .gfield--width-third,
	.gform_wrapper .gfield--width-quarter {
		grid-column: span 12;
	}

	.gform_wrapper .gform_footer {
		justify-content: stretch;
	}

	.gform_wrapper button[type="submit"] {
		width: 100%;
	}

	/* Buttons shrink to their label so the 15 / 20px padding holds */
	.pi-btn {
		min-width: 0;
	}

	.pi-grid-2 {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Footer: offices stacked on the left, social + legal on the right (per mobile comp) */
	.pi-footer__top {
		gap: 16px;
		padding-top: 18px;
		padding-bottom: 70px;
	}

	.pi-footer__offices {
		flex-direction: column;
		gap: 18px;
	}

	.pi-footer__title {
		margin-bottom: 6px;
		font-size: 17px;
	}

	.pi-footer__office p,
	.pi-footer__legal {
		font-size: 14px;
		line-height: 1.3;
	}

	.pi-footer__aside {
		flex: 0 0 auto;
		max-width: 46%;
		gap: 12px;
	}

	/* Legal lines under the wordmark: copyright left, credit + Privacy Policy right */
	.pi-footer__legal--bottom {
		flex-wrap: nowrap;
		justify-content: space-between;
		align-items: flex-start;
		gap: 16px;
		padding-bottom: calc(var(--pi-gutter) + env(safe-area-inset-bottom, 0px));
	}

	.pi-footer__legal--bottom .pi-footer__links {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		flex-shrink: 0;
		white-space: nowrap;
	}

	.pi-footer__legal--bottom .pi-footer__copyright span {
		display: block;
	}

	.pi-footer__legal--bottom .pi-footer__copyright span + span::before {
		content: none;
	}

	.pi-footer__legal--bottom .pi-footer__links {
		gap: 0;
		margin-top: 0 !important;
		text-align: right;
	}

	.pi-footer__wordmark-wide {
		display: none !important;
	}

	.pi-footer__wordmark-stacked {
		display: block !important;
		margin-bottom: 2px;
	}

	/* Type scale on phones (from the mobile comps) */
	:root {
		--pi-fs-display: 16.5vw;
		--pi-fs-h1: clamp(2rem, 8.6vw, 2.5rem);
		--pi-fs-h2: clamp(1.6rem, 7vw, 2rem);
		--pi-fs-h3: clamp(1.25rem, 5.4vw, 1.5rem);
		--pi-fs-statement: clamp(1.4rem, 6.2vw, 1.75rem);
		--pi-fs-lead: 1.0625rem;
		--pi-fs-body: 1.0625rem;
		--pi-fs-ui: 1.0625rem;
		--pi-fs-small: .9375rem;
		--pi-space: 60px;
		--pi-gap: 12px;
	}
}

/* Extra Small Devices, Phones */
@media only screen and (max-width : 575.98px) {
	.pi-grid-4 {
		grid-template-columns: minmax(0, 1fr);
	}
}


@media only screen and (max-width : 782px) {
	body.admin-bar .pi-header { top: 46px; }
	body.admin-bar .pi-header.is-hidden { transform: translateY(calc(-100% - 46px)); }
}

/* WP admin bar scrolls away on phones */
@media only screen and (max-width : 600px) {
	body.admin-bar .pi-header { top: 0; }
	body.admin-bar .pi-header.is-hidden { transform: translateY(-100%); }
}
