/* Shared customer-facing responsive behavior. Page-specific themes retain ownership of color and content. */
:root {
	--lv-responsive-gutter: clamp(0.875rem, 4vw, 1.5rem);
	--lv-responsive-target: 44px;
	--lv-responsive-dock-height: 4.85rem;
}

html { max-width: 100%; }
body { max-width: 100%; overflow-wrap: break-word; }
img, svg, video, canvas { max-width: 100%; }
main, section, article, aside, header, footer, nav, form, fieldset, div { min-width: 0; }
input, select, textarea, button { max-width: 100%; }

.lv-responsive-menu-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 0.625rem;
	color: inherit;
	cursor: pointer;
	display: none;
	font: inherit;
	font-size: 0.86rem;
	font-weight: 800;
	justify-content: center;
	min-height: var(--lv-responsive-target);
	min-width: var(--lv-responsive-target);
	padding: 0.5rem 0.7rem;
}

.lv-mobile-action-dock {
	align-items: stretch;
	background: rgba(255, 255, 255, 0.97);
	border-top: 1px solid #c8d5e3;
	bottom: 0;
	box-shadow: 0 -0.75rem 2.2rem rgba(7, 31, 51, 0.14);
	display: none;
	gap: 0.55rem;
	grid-template-columns: repeat(var(--lv-action-count, 2), minmax(0, 1fr));
	left: 0;
	opacity: 0;
	padding: 0.65rem max(var(--lv-responsive-gutter), env(safe-area-inset-right)) max(0.65rem, env(safe-area-inset-bottom)) max(var(--lv-responsive-gutter), env(safe-area-inset-left));
	pointer-events: none;
	position: fixed;
	transform: translateY(110%);
	transition: opacity 180ms ease, transform 180ms ease;
	width: 100%;
	z-index: 90;
}

.lv-mobile-action-dock.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.lv-mobile-action-dock.is-suppressed {
	opacity: 0;
	pointer-events: none;
	transform: translateY(110%);
}

.lv-mobile-action-dock a,
.lv-mobile-action-dock button {
	align-items: center;
	background: #146ef5;
	border: 1px solid #146ef5;
	border-radius: 0.68rem;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: clamp(0.76rem, 3vw, 0.9rem);
	font-weight: 800;
	justify-content: center;
	line-height: 1.15;
	min-height: var(--lv-responsive-target);
	padding: 0.58rem 0.55rem;
	text-align: center;
	text-decoration: none;
}

.lv-mobile-action-dock a:first-child,
.lv-mobile-action-dock button:first-child {
	background: #fff;
	border-color: #8da9c5;
	color: #0b365f;
}

.lv-mobile-action-dock[data-actions-count="3"] a,
.lv-mobile-action-dock[data-actions-count="3"] button {
	font-size: clamp(0.68rem, 2.7vw, 0.8rem);
	padding-inline: 0.35rem;
}

/* Provider profiles retain their native action hierarchy and destinations. */
.lv-listing-page .lv-listing-action {
	touch-action: manipulation;
	transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.lv-listing-page .lv-listing-action--primary {
	background: var(--lv-action-primary-bg, var(--lv-color-brand-limo-blue, #146ef5));
	border-color: var(--lv-action-primary-bg, var(--lv-color-brand-limo-blue, #146ef5));
	box-shadow: 0 0.55rem 1.35rem rgba(11, 31, 51, 0.18);
	color: var(--lv-action-primary-text, var(--lv-color-text-inverse, #fff));
}

.lv-listing-page .lv-listing-action--primary:hover {
	background: var(--lv-color-text-link-on-light, #0b57d0);
	border-color: var(--lv-color-text-link-on-light, #0b57d0);
	box-shadow: 0 0.75rem 1.6rem rgba(11, 31, 51, 0.23);
	color: var(--lv-color-text-inverse, #fff);
	transform: translateY(-1px);
}

.lv-listing-page .lv-listing-action--secondary {
	background: var(--lv-color-surface-card, #fff);
	border-color: var(--lv-color-brand-platinum, #c8d1dc);
	color: var(--lv-color-text-link-on-light, #0b57d0);
}

.lv-listing-page .lv-listing-action--secondary:hover {
	background: var(--lv-sky, #eaf3ff);
	border-color: var(--lv-color-brand-electric-blue, #38a3ff);
	box-shadow: 0 0.5rem 1.15rem rgba(11, 31, 51, 0.12);
	color: var(--lv-color-brand-midnight-navy, #0b1f33);
	transform: translateY(-1px);
}

.lv-listing-page .lv-listing-action:active {
	box-shadow: 0 0.2rem 0.55rem rgba(11, 31, 51, 0.16);
	transform: translateY(0);
}

.lv-listing-page .lv-listing-action:focus-visible {
	outline: 3px solid var(--lv-color-focus, var(--lv-color-brand-electric-blue, #38a3ff));
	outline-offset: 3px;
}

.lv-listing-page .lv-listing-mobile-actions {
	background: var(--lv-color-surface-card, #fff);
	border-color: var(--lv-color-border-neutral, #d7dee8);
	z-index: 90;
}

.lv-listing-page .lv-listing-mobile-actions .lv-listing-action[href^="tel:"] {
	background: var(--lv-color-brand-midnight-navy, #0b1f33);
	border-color: var(--lv-color-brand-midnight-navy, #0b1f33);
	color: var(--lv-color-text-inverse, #fff);
}

.lv-listing-page .lv-listing-mobile-actions .lv-listing-action[href^="tel:"]:hover {
	background: var(--lv-color-text-link-on-light, #0b57d0);
	border-color: var(--lv-color-text-link-on-light, #0b57d0);
	color: var(--lv-color-text-inverse, #fff);
}

.lv-listing-page .lv-listing-mobile-actions .lv-listing-action--text {
	background: var(--lv-color-surface-card, #fff);
	border-color: var(--lv-color-brand-platinum, #c8d1dc);
	color: var(--lv-color-text-link-on-light, #0b57d0);
	text-decoration: none;
}

@media (max-width: 52rem) {
	.lv-responsive-enhanced body.lv-responsive-dock-visible,
	body.lv-responsive-enhanced.lv-responsive-dock-visible {
		padding-bottom: calc(var(--lv-responsive-dock-height) + env(safe-area-inset-bottom));
	}

	.lv-mobile-action-dock { display: grid; }

	.lv-responsive-menu-toggle { display: inline-flex; }

	/* Main WordPress customer header. */
	.lv-production-site .lv-site-header__inner {
		display: grid;
		gap: 0.5rem;
		grid-template-columns: var(--lv-responsive-target) minmax(0, 1fr) var(--lv-responsive-target);
		min-height: 4.8rem;
		padding-inline: var(--lv-responsive-gutter);
	}
	.lv-production-site .lv-brand { grid-column: 2; justify-self: center; }
	.lv-production-site .lv-nav-toggle { grid-column: 3; justify-self: end; }
	.lv-production-site .lv-nav { grid-column: 1 / -1; width: 100%; }
	.lv-production-site .lv-nav a { min-height: var(--lv-responsive-target); }

	/* Standalone public shell headers. */
	.lvm-header,
	.lvr-header,
	.lv-lead-header,
	.lv-provider-header {
		align-items: center;
		display: grid;
		gap: 0.55rem;
		grid-template-columns: var(--lv-responsive-target) minmax(0, 1fr) var(--lv-responsive-target);
		min-height: 4.8rem;
		padding: 0.6rem var(--lv-responsive-gutter);
	}
	.lvm-header > a:first-child,
	.lvr-header > a:first-child,
	.lv-lead-header > a:first-child,
	.lv-provider-header > a:first-child,
	.lv-provider-header > .lv-provider-brand {
		grid-column: 2;
		justify-self: center;
	}
	.lvm-header > .lv-responsive-menu-toggle,
	.lvr-header > .lv-responsive-menu-toggle,
	.lv-lead-header > .lv-responsive-menu-toggle,
	.lv-provider-header > .lv-provider-menu-toggle {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
	}
	.lvm-header > nav,
	.lvr-header > nav,
	.lv-lead-header > nav,
	.lv-provider-header > nav {
		border-top: 1px solid rgba(170, 198, 220, 0.28);
		display: none;
		grid-column: 1 / -1;
		max-height: min(65vh, 32rem);
		overflow-y: auto;
		padding-top: 0.55rem;
		width: 100%;
	}
	.lvm-header > nav.is-open,
	.lvr-header > nav.is-open,
	.lv-lead-header > nav.is-open,
	.lv-provider-header > nav.is-open { display: flex; }
	.lvm-header > nav,
	.lvr-header > nav,
	.lv-lead-header > nav,
	.lv-provider-header > nav {
		align-items: stretch;
		flex-direction: column;
		gap: 0.2rem;
	}
	.lvm-header > nav a,
	.lvr-header > nav a,
	.lv-lead-header > nav a,
	.lv-provider-header > nav a,
	.lv-provider-header > nav form,
	.lv-provider-header > nav button {
		justify-content: flex-start;
		min-height: var(--lv-responsive-target);
		width: 100%;
	}

	.lv31-header .lv31-nav {
		display: grid;
		gap: 0.5rem;
		grid-template-columns: var(--lv-responsive-target) minmax(0, 1fr) var(--lv-responsive-target);
		min-height: 4.8rem;
	}
	.lv31-header .lv31-nav > a:first-child { grid-column: 2; justify-self: center; }
	.lv31-header .lv31-nav > .lv-responsive-menu-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
	.lv31-header .lv31-nav > .lv31-button { display: none; }
	.lv31-header .lv31-nav > nav {
		align-items: stretch;
		border-top: 1px solid #d7e0ea;
		display: none;
		flex-direction: column;
		gap: 0.15rem;
		grid-column: 1 / -1;
		padding-top: 0.55rem;
		width: 100%;
	}
	.lv31-header .lv31-nav > nav.is-open { display: flex; }
	.lv31-header .lv31-nav > nav a { align-items: center; display: flex; min-height: var(--lv-responsive-target); }

	.lv-location-header {
		align-items: center;
		display: grid;
		gap: 0.35rem;
		grid-template-columns: 1fr;
		justify-items: center;
		padding: 0.7rem var(--lv-responsive-gutter);
		text-align: center;
	}

	/* Mobile inputs should remain legible and never trigger iOS zoom. */
	input:not([type="checkbox"]):not([type="radio"]), select, textarea {
		font-size: max(1rem, 16px);
	}
	button, [role="button"], input[type="submit"], input[type="button"] {
		min-height: var(--lv-responsive-target);
	}

	/* Location control shared by the homepage and directory search. */
	.lv-home-location,
	.lv-discovery-location-picker {
		align-items: center;
		gap: 0.55rem 0.6rem;
		grid-template-columns: auto minmax(0, 1fr);
		max-width: none;
		padding: 0.7rem;
		width: 100%;
	}
	.lv-home-location__icon,
	.lv-discovery-location-picker__icon { grid-column: 1; grid-row: 1; }
	.lv-home-location__copy,
	.lv-discovery-location-picker__copy { grid-column: 2; grid-row: 1; }
	.lv-home-location__change,
	.lv-discovery-location-picker__change,
	.lv-home-location__use,
	.lv-discovery-location-picker__use {
		grid-row: 2;
		justify-content: center;
		justify-self: stretch;
		min-height: var(--lv-responsive-target) !important;
		width: 100%;
	}
	.lv-home-location__change,
	.lv-discovery-location-picker__change { grid-column: 1 / 2; }
	.lv-home-location__use,
	.lv-discovery-location-picker__use { grid-column: 2 / 3; }
	.lv-discovery-location-picker__status { grid-column: 1 / -1; }

	/* Use the complete mobile canvas for public cards. */
	.lv-listing-card-grid,
	.lv-directory-results,
	.lv-discovery-grid,
	.lv-location-results,
	.lv-public-card-grid,
	.lv31-grid,
	.lv-provider-lead-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		justify-content: stretch;
		width: 100%;
	}
	.lv-listing-card,
	.lv-directory-results > *,
	.lv-discovery-grid > *,
	.lv-location-results > *,
	.lv-public-card-grid > *,
	.lv31-grid > *,
	.lv-provider-lead-grid > * {
		margin-inline: 0;
		max-width: none;
		width: 100%;
	}

	.lv-home-provider-section:first-of-type,
	.lv-home-provider-section:first-child { padding-top: 0 !important; }
	.lv-home-discovery__inner,
	.lv-home-discovery-inner { padding-top: clamp(1.5rem, 5vw, 2.5rem) !important; }
}

@media (max-width: 26.25rem) {
	.lv-responsive-enhanced .lv-listing-page {
		padding-bottom: calc(8rem + env(safe-area-inset-bottom));
	}
	body.lv-responsive-enhanced.lv-listing-actions-native .lv-site-footer {
		padding-bottom: calc(8rem + env(safe-area-inset-bottom));
	}
	.lv-responsive-enhanced .lv-listing-page .lv-listing-mobile-actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.lv-responsive-enhanced .lv-listing-page .lv-listing-mobile-actions > :first-child {
		grid-column: 1 / -1;
	}
	.lv-responsive-enhanced .lv-listing-page .lv-listing-mobile-actions a:nth-child(n+3) {
		display: flex;
	}
}

@media (max-width: 34rem) {
	.lv-production-site .lv-brand img,
	.lvm-header img,
	.lvr-header img,
	.lv-lead-header img,
	.lv31-header a[aria-label="LimoVibes home"] img,
	.lv-provider-header img,
	.lv-location-header img {
		height: auto;
		max-height: none;
		width: min(17.5rem, calc(100vw - 6rem));
	}

	.lv-shell,
	.lv31-wrap,
	.lv-location-container {
		max-width: 100%;
	}

	.lv-mobile-action-dock { gap: 0.42rem; }
}

@media (max-width: 22rem) {
	.lv-mobile-action-dock[data-actions-count="3"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.lv-mobile-action-dock[data-actions-count="3"] > :last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.lv-mobile-action-dock { transition: none; }
}

@media (forced-colors: active) {
	.lv-mobile-action-dock { border: 2px solid CanvasText; }
	.lv-mobile-action-dock a,
	.lv-mobile-action-dock button,
	.lv-responsive-menu-toggle { border: 2px solid ButtonText; }
}
