/*
Theme Name: A2 Parking
Theme URI: https://a2parking.com
Description: Child theme of GeneratePress for A2 Parking.
Author: Adam
Template: generatepress
Version: 1.0.0
Text Domain: a2parking-child
*/

:root {
	--um-blue: #00274C;
	--um-maize: #FFCB05;
	--um-black: #131516;
}

body {
	font-size: 19px;
}

/* Keep the footer pinned to the bottom of the viewport on short pages
   (like 404s) instead of floating right under sparse content. */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-footer {
	margin-top: auto;
}

.wp-block-buttons {
	margin-bottom: 2em;
}

.wp-block-columns {
	align-items: flex-start !important;
	margin-top: 2.5em !important;
	margin-bottom: 2.5em !important;
}

/* Gutenberg writes a per-block inline style forcing flex-wrap:nowrap on this
   columns block, which blocks its own core mobile-stacking breakpoint.
   Force wrapping back on and stack columns full-width below that breakpoint. */
@media (max-width: 781px) {
	.wp-block-columns {
		flex-wrap: wrap !important;
	}

	/* display:contents drops the column wrapper's own box so its section
	   children become direct flex items of .wp-block-columns — that's what
	   lets a single section (Questions) reorder independently of which
	   column it lives in, via the order rule below. */
	.wp-block-columns > .wp-block-column {
		display: contents;
	}

	/* margin-bottom: 0 — once stacked, the columns' own flex gap spaces the
	   sections; the desktop in-column margin on top of it doubled the gap
	   after Games and Location. */
	.wp-block-columns .a2p-section {
		flex-basis: 100% !important;
		width: 100% !important;
		margin-bottom: 0;
	}

	.a2p-questions-section {
		order: 99;
	}
}

.a2p-section {
	border: 1px solid rgba(255, 203, 5, 0.5);
	border-radius: 10px;
	padding: 1.5em;
	margin-bottom: 2em;
}

/* Gutenberg's default Group block layout constrains children to a narrow
   content width regardless of the section's own padding — override it so
   headings/shortcode content use the full available width. Targeting the
   exact classes directly since a generic ">' *" child selector wasn't
   winning against whatever sets the narrower width. */
.a2p-section > *,
.a2p-section .wp-block-group__inner-container,
.a2p-section .wp-block-group__inner-container > *,
.a2p-section h2,
.a2p-upcoming-events,
.a2p-weather-periods,
.a2p-address-line {
	width: 100% !important;
	max-width: none !important;
}

.a2p-section:last-child {
	margin-bottom: 0;
}

/* Site-wide dark theme: UM blue background, light text */
html,
body,
.site,
#page,
.site-content,
.content-area,
#primary,
#main,
main,
article,
.inside-article,
.entry-content {
	background-color: var(--um-blue) !important;
	color: #fff !important;
}

.site-header,
.main-navigation,
.main-navigation .inside-navigation {
	background-color: var(--um-blue) !important;
	color: #fff;
}

.site-footer,
.site-footer .inside-footer {
	background-color: var(--um-black) !important;
	color: #fff;
}

.a2p-header-widgets {
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	flex-wrap: wrap;
	width: 100%;
	gap: 1.25em;
}

.a2p-header-divider {
	width: 1px;
	background: rgba(255, 203, 5, 0.3);
}

.a2p-countdown {
	font-family: 'Oswald', sans-serif;
	color: var(--um-maize) !important;
	margin: 0.4em 0 0.6em;
	padding: 0 0.5em;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.3em;
}

.a2p-header-weather {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3em;
	margin: 0.4em 0 0.6em;
}

.a2p-header-weather-title {
	font-family: 'Oswald', sans-serif;
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	color: #fff !important;
}

.a2p-header-weather-content {
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex: 1;
}

.a2p-header-weather-info {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.a2p-header-weather-temp {
	font-weight: 600;
	color: var(--um-maize) !important;
	font-size: 0.95rem;
}

.a2p-header-weather-desc {
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.7) !important;
}

.a2p-header-weather-hours {
	display: flex;
	align-items: flex-start;
	gap: 0.7em;
	flex: 1;
}

.a2p-header-weather-hour {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1em;
}

.a2p-header-weather-hour-label {
	font-size: 0.65rem;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: rgba(255, 255, 255, 0.6) !important;
}

.a2p-header-weather-hour .a2p-header-weather-temp {
	font-size: 0.85rem;
}

/* Desktop-only: hides on the same breakpoint the header/countdown already use for mobile */
@media (max-width: 768px) {
	.a2p-header-weather,
	.a2p-header-divider {
		display: none;
	}
}

/* Mirror of the above — the full multi-period weather section on the page is desktop's
   old spot for this; keep it for mobile only until mobile gets its own pass */
@media (min-width: 769px) {
	.a2p-weather-section {
		display: none;
	}
}

.a2p-countdown-title {
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	color: #fff !important;
}

.a2p-countdown-boxes {
	display: flex;
	gap: 0.5em;
}

.a2p-countdown-box {
	width: 3.4em;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 203, 5, 0.4);
	border-radius: 6px;
	padding: 0.3em 0;
}

.a2p-countdown-num {
	font-size: 1.3rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	color: var(--um-maize);
}

.a2p-countdown-label {
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
	.site-header .inside-header {
		text-align: center;
	}

	.a2p-header-widgets {
		justify-content: center;
	}

	.a2p-countdown {
		align-items: center;
	}

	.a2p-countdown-boxes {
		justify-content: center;
	}
}

.site-header .main-title a,
.site-header .site-description,
.main-navigation a,
.site-footer a {
	color: #fff !important;
}

.a2p-footer-info {
	margin-bottom: 0.5em;
}

.a2p-footer-sep {
	margin: 0 0.5em;
	color: rgba(255, 255, 255, 0.4);
}

.a2p-footer-address-break {
	display: none;
}

/* Mobile: the inline bullet-separated list is a poor set of tap targets on
   a phone. Split into two columns instead — address on the left, phone and
   Venmo stacked on the right. Each link gets padding for a bigger tap
   target, offset by a matching negative margin so the padding only grows
   the hit area — actual visual spacing is controlled by row-gap alone,
   so it stays even instead of stacking padding on top of the gap. */
@media (max-width: 768px) {
	.a2p-footer-address-break {
		display: inline;
	}

	.a2p-footer-info {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 1.5em;
		row-gap: 0.75em;
		text-align: left;
		line-height: 1.4;
		margin-bottom: 1.5em;
	}

	.a2p-footer-sep {
		display: none;
	}

	.a2p-footer-address,
	.a2p-footer-phone,
	.a2p-footer-venmo {
		display: inline-block;
		padding: 0.45em 0.3em;
		margin: -0.45em -0.3em;
	}

	.a2p-footer-address {
		grid-column: 1;
		grid-row: 1 / 3;
	}

	.a2p-footer-phone {
		grid-column: 2;
		grid-row: 1;
	}

	.a2p-footer-venmo {
		grid-column: 2;
		grid-row: 2;
	}
}

.main-navigation a:hover,
.site-footer a:hover {
	color: var(--um-maize) !important;
}

#page a {
	color: var(--um-maize) !important;
}

#page a:hover {
	color: #fff !important;
}

h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6,
.entry-title,
.entry-title a,
.site-header .main-title {
	color: var(--um-maize) !important;
	font-family: 'Oswald', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.site-header .main-title {
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.site-header .main-title::before {
	content: '';
	display: inline-block;
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border: 2px solid var(--um-maize);
	border-radius: 8px;
	box-sizing: border-box;
	background-color: var(--um-blue);
	background-image: url('assets/img/favicon.svg');
	background-size: 75%;
	background-position: center;
	background-repeat: no-repeat;
}

/* Buttons — maize on blue reads as the primary CTA color */
/* (#page prefix keeps these above the #page a link-color rule in specificity) */
#page .wp-block-button__link,
.gform_button,
input[type="submit"] {
	background-color: var(--um-maize) !important;
	color: var(--um-blue) !important;
	border: none !important;
	border-radius: 10px !important;
	font-weight: 600;
	transition: background-color 0.15s ease;
}

#page .wp-block-button__link:hover,
.gform_button:hover,
input[type="submit"]:hover {
	background-color: #fff !important;
	color: var(--um-blue) !important;
}

/* Secondary CTA style — outline instead of solid maize, for actions like Venmo that aren't the primary conversion */
#page .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	border: 2px solid var(--um-maize) !important;
	color: var(--um-maize) !important;
}

#page .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--um-maize) !important;
	color: var(--um-blue) !important;
}

/* Venmo icon badge — sits beside the "Pay via Venmo" button, stretches to match its height via the flex row default */
.wp-block-buttons:has(.a2p-venmo-badge) {
	gap: 0.25em;
}

.a2p-venmo-badge {
	display: flex;
}

#page .wp-block-button.is-style-outline.a2p-venmo-badge .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 49.5px;
	box-sizing: border-box;
	padding: 0 0.9em !important;
	border: none !important;
	background-color: transparent !important;
}

@media (max-width: 768px) {
	#page .wp-block-button.is-style-outline.a2p-venmo-badge .wp-block-button__link {
		padding-left: 0 !important;
	}
}

.a2p-venmo-monogram {
	border-radius: 20%;
	display: block;
	height: 100%;
	width: auto;
}

/* Gravity Forms labels/instructions inherit body color already (white), just tidy contrast */
.gform_wrapper .gfield_label,
.gform_wrapper legend.gfield_label,
.gform_wrapper .gfield_description,
.gform_wrapper .gform_description,
.gform_wrapper label,
.gform_wrapper .gfield_required {
	color: #fff !important;
}

.gform_wrapper input:not([type="submit"]),
.gform_wrapper select,
.gform_wrapper textarea {
	background-color: #fff !important;
	color: #111 !important;
}

/* GF Orbital accents → maize instead of GF blue, which disappears on navy.
   Specificity has to beat GF's inline #gform_wrapper_N[data-form-index].gform-theme
   variable block, which prints after this stylesheet. Covers field focus
   rings/borders; checked boxes/radios get a maize fill with a navy mark. */
#page .gform_wrapper.gform-theme.gform-theme--orbital {
	--gf-color-primary: #FFCB05;
	--gf-color-primary-rgb: 255, 203, 5;
	--gf-color-primary-contrast: #00274C;
	--gf-color-primary-contrast-rgb: 0, 39, 76;
	--gf-color-primary-darker: #CD9900;
	--gf-color-primary-lighter: #FFFD37;
	--gf-color-in-ctrl-primary: #FFCB05;
	--gf-color-in-ctrl-primary-rgb: 255, 203, 5;
	--gf-color-in-ctrl-primary-contrast: #00274C;
	--gf-color-in-ctrl-primary-contrast-rgb: 0, 39, 76;
	--gf-color-in-ctrl-primary-darker: #CD9900;
	--gf-color-in-ctrl-primary-lighter: #FFFD37;
	--gf-ctrl-border-color-focus: #FFCB05;
	--gf-ctrl-outline-color-focus: rgba(255, 203, 5, 0.65);
	--gf-ctrl-choice-check-color: #00274C;

	/* GF defaults (13–14px) read tiny next to the 19px body copy. 17px
	   inputs also stop iOS Safari from zooming in on focus (needs ≥16px). */
	--gf-font-size-primary: 17px;
	--gf-font-size-secondary: 17px;
	--gf-font-size-tertiary: 15px;
	--gf-ctrl-font-size: 17px;
	--gf-ctrl-label-font-size-primary: 17px;
	--gf-ctrl-label-font-size-secondary: 17px;
	--gf-ctrl-label-font-size-tertiary: 15px;
	--gf-ctrl-desc-font-size: 15px;
	--gf-ctrl-btn-font-size: 17px;
}

#page .gform_wrapper .gfield_required {
	font-size: 14px;
}

/* Center the 20px checkbox/radio on the first line of its 17px label
   (line-height ~24px), instead of top-aligned. Top-based rather than
   align-items:center so wrapped labels on mobile still line up. */
#page .gform_wrapper .gchoice input[type="checkbox"],
#page .gform_wrapper .gchoice input[type="radio"] {
	margin-top: 2px;
}

/* Checked/selected choices read as selected at a glance */
#page .gform_wrapper .gchoice input[type="checkbox"]:checked + label,
#page .gform_wrapper .gchoice input[type="radio"]:checked + label {
	color: var(--um-maize) !important;
}

/* Choice labels toggle their box, so show them as clickable */
#page .gform_wrapper .gchoice input[type="checkbox"],
#page .gform_wrapper .gchoice input[type="radio"],
#page .gform_wrapper .gchoice label {
	cursor: pointer;
}

#page .gform_wrapper input[type="checkbox"]:checked,
#page .gform_wrapper input[type="radio"]:checked {
	background-color: var(--um-maize) !important;
	border-color: var(--um-maize) !important;
}


.a2p-upcoming-events {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); /* min() lets a card shrink below 240px on narrow phones instead of overflowing */
	gap: 1.5em;
	margin: 2em 0;
}

.a2p-event {
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-top: 4px solid var(--um-maize);
	border-radius: 6px;
	padding: 1.25em;
	padding-bottom: 4em;
	background: rgba(255, 255, 255, 0.05);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Highlight only — no lift; moving the cards on hover was distracting */
.a2p-event:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
	border-color: rgba(255, 203, 5, 0.7);
}

.a2p-event-date {
	font-weight: 600;
	color: var(--um-maize) !important;
	margin-bottom: 0.25em;
}

.a2p-event-time {
	font-weight: 400;
	color: rgba(255, 255, 255, 0.7) !important;
	margin-left: 0.5em;
}

/* Phones: kickoff time on its own line instead of wrapping mid-time */
@media (max-width: 768px) {
	.a2p-event-time {
		display: block;
		margin-left: 0;
	}
}

.a2p-event-title {
	margin: 0.25em 0;
	color: #fff !important;
}

.a2p-event-today-badge {
	position: absolute;
	top: 0;
	left: 0;
	background: var(--um-maize);
	color: var(--um-blue) !important;
	font-weight: 700;
	font-size: 19px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.3em 0.8em;
	border-radius: 0 0 6px 0;
}

.a2p-event-has-today-badge {
	padding-top: 2.9em;
}

.a2p-event-logo-corner {
	position: absolute;
	bottom: 20px;
	right: 20px;
	width: 70px;
	height: 70px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 9px;
	background: #fff;
	border-radius: 50%;
}

.a2p-event-logo {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.a2p-event-type {
	display: inline-block;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: var(--um-maize);
	color: var(--um-blue) !important;
	border-radius: 3px;
	padding: 0.15em 0.5em;
	margin-right: 0.5em;
}

.a2p-event-price {
	font-weight: 600;
	color: #fff !important;
}

.a2p-event-notes {
	margin-top: 0.5em;
	color: rgba(255, 255, 255, 0.75) !important;
	font-size: 0.95em;
}

/* Bottom-left, vertically centered against the 70px logo badge (bottom: 20px) */
#page .a2p-event-reserve {
	position: absolute;
	left: 1.25em;
	bottom: 39px;
	display: inline-block;
	background: var(--um-maize);
	color: var(--um-blue) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.45em 1em;
	border-radius: 8px;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

#page .a2p-event-reserve:hover,
#page .a2p-event-reserve:focus {
	background: #fff;
	color: var(--um-blue) !important; /* beats the site-wide #page a:hover white */
}

/* Phones: the page box, section box, GP's group inner wrapper and the card
   each added ~30px a side (≈112px total), which squeezed the cards, pushed
   the page wider than the screen and made the logo collide with the button. */
@media (max-width: 768px) {
	.separate-containers .inside-article {
		padding-left: 16px;
		padding-right: 16px;
	}

	.a2p-section {
		padding: 20px 16px;
	}

	.site-main .a2p-section .wp-block-group__inner-container {
		padding: 0 !important;
	}

	.a2p-upcoming-events {
		margin: 1.25em 0 0;
	}

	.a2p-event {
		padding-left: 16px;
		padding-right: 16px;
	}

	.a2p-event-logo-corner {
		width: 60px;
		height: 60px;
		padding: 8px;
		right: 16px;
		bottom: 16px;
	}

	/* Re-center against the smaller 60px badge (bottom 16px → center 46px) */
	#page .a2p-event-reserve {
		left: 16px;
		bottom: 30px;
	}
}

.a2p-weather-note {
	font-weight: 600;
	color: var(--um-maize) !important;
}

.a2p-weather-periods {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 140px));
	justify-content: center;
	gap: 1em;
	margin: 1em 0;
}

.a2p-weather-period {
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-top: 4px solid var(--um-maize);
	border-radius: 6px;
	padding: 0.75em 0.5em;
	background: rgba(255, 255, 255, 0.05);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.a2p-weather-period:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
	border-color: rgba(255, 203, 5, 0.7);
}

.a2p-weather-period-name {
	font-weight: 600;
	font-size: 0.85em;
	margin-bottom: 0.25em;
	color: #fff !important;
}

.a2p-weather-icon {
	display: block;
	margin: 0 auto;
}

.a2p-weather-temp {
	font-weight: 600;
	color: var(--um-maize) !important;
}

.a2p-weather-desc {
	font-size: 0.8em;
	color: rgba(255, 255, 255, 0.75) !important;
}

.a2p-weather-credit {
	font-size: 0.8em;
	color: rgba(255, 255, 255, 0.6) !important;
	margin-top: 0.5em;
	text-align: center;
}

#page .a2p-weather-credit a {
	color: rgba(255, 255, 255, 0.8) !important;
}

.a2p-weather-unavailable {
	color: rgba(255, 255, 255, 0.75) !important;
}

.a2p-icon {
	color: var(--um-maize);
	fill: currentColor;
	vertical-align: -3px;
	margin-right: 0.15em;
}

.a2p-house-inline-icon {
	width: 52px;
	height: 52px;
	vertical-align: -14px;
	margin-right: 0.3em;
}

.a2p-address-line {
	display: flex;
	align-items: center;
	gap: 0.4em;
}

.a2p-address-icons {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.a2p-address-icons .a2p-house-inline-icon,
.a2p-address-icons .a2p-icon {
	margin-right: 0.15em;
	vertical-align: middle;
}

.a2p-illustration {
	margin: 1.25em 0 !important;
	max-width: 260px;
	border: 1px solid rgba(255, 203, 5, 0.5);
	border-radius: 10px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
}

.a2p-illustration img {
	display: block;
	width: 100%;
	height: auto;
}

.a2p-illustration:focus-visible {
	outline: 3px solid var(--um-maize);
	outline-offset: 2px;
}

.a2p-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 10, 24, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 2em;
}

.a2p-lightbox[hidden] {
	display: none;
}

.a2p-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	border-radius: 10px;
}

.a2p-lightbox-close {
	position: absolute;
	top: 1em;
	right: 1.2em;
	background: var(--um-maize);
	color: var(--um-blue);
	border: none;
	border-radius: 50%;
	width: 2.2em;
	height: 2.2em;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.a2p-lightbox-close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}
