/* MyGravelBuddy — ZIP pricing: header delivery tag + price nodes.
 *
 * Palette is lifted from the Elementor kit so the control reads as part of
 * the header, not an add-on: ink #2A2C38, muted #6B6E7A, hairline
 * rgba(42,44,56,.16), accent (brand primary) #E8874A, hover #2B7BB0.
 * Type inherits Poppins from the theme.
 */

.mygb-loc {
	--mygb-ink: #2a2c38;
	--mygb-muted: #6b6e7a;
	--mygb-line: rgba(42, 44, 56, .16);
	--mygb-accent: #e8874a;
	--mygb-hover: #2b7bb0;
	--mygb-paper: #fdfdfd;
	position: relative;
	display: flex;
	align-items: center;
	align-self: center;
	font-family: inherit;
}

/* ------------------------------------------------------------------ */
/* The chip                                                             */
/* ------------------------------------------------------------------ */

/* Doubled-class specificity beats the Elementor kit's global `button`
   styling (`.elementor-kit-N button`), which would otherwise paint this
   chip like a primary CTA. Full reset, then our own look. */
.mygb-loc .mygb-loc__chip,
.mygb-loc .mygb-loc__chip:hover,
.mygb-loc .mygb-loc__chip:focus {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 6px 10px;
	background: transparent;
	background-image: none;
	border: 0;
	box-shadow: none;
	border-radius: 8px;
	cursor: pointer;
	color: var(--mygb-ink);
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	text-transform: none;
	letter-spacing: normal;
	text-align: left;
	line-height: 1.15;
	min-height: 0;
	transition: background-color .15s ease;
}
.mygb-loc .mygb-loc__chip:hover { background: rgba(42, 44, 56, .05); }
.mygb-loc .mygb-loc__chip:focus-visible {
	outline: 2px solid var(--mygb-hover);
	outline-offset: 2px;
}

.mygb-loc__pin { color: var(--mygb-accent); flex: none; }
.mygb-loc__pin-dot { opacity: 0; transition: opacity .15s ease; }
.mygb-loc[data-loc-state="set"] .mygb-loc__pin-dot { opacity: 1; }

.mygb-loc__copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.mygb-loc__eyebrow {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--mygb-muted);
	white-space: nowrap;
}

.mygb-loc__value {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mygb-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 200px;
}
/* Fill-in-the-blank underline invites the click while no ZIP is set. */
.mygb-loc[data-loc-state="empty"] .mygb-loc__value {
	color: var(--mygb-accent);
	border-bottom: 1.5px dashed currentColor;
	padding-bottom: 1px;
}

.mygb-loc__chev {
	color: var(--mygb-muted);
	flex: none;
	transition: transform .15s ease;
}
.mygb-loc.is-open .mygb-loc__chev { transform: rotate(180deg); }

/* ------------------------------------------------------------------ */
/* The popover                                                          */
/* ------------------------------------------------------------------ */

.mygb-loc__pop {
	position: fixed; /* JS anchors it under the chip; sheet on mobile */
	z-index: 100000;
	width: 288px;
	background: #fff;
	border: 1px solid var(--mygb-line);
	border-radius: 12px;
	box-shadow: 0 14px 34px rgba(42, 44, 56, .16), 0 3px 8px rgba(42, 44, 56, .08);
	padding: 16px;
}
.mygb-loc__pop[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
	.mygb-loc__pop { animation: mygb-pop .16s ease; }
	@keyframes mygb-pop {
		from { opacity: 0; transform: translateY(-4px); }
		to   { opacity: 1; transform: none; }
	}
}

.mygb-loc__pop-title {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mygb-ink);
}

.mygb-loc__form { display: flex; gap: 8px; margin: 0; }

.mygb-loc__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 9px 11px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--mygb-ink);
	background: var(--mygb-paper);
	border: 1px solid var(--mygb-line);
	border-radius: 8px;
}
.mygb-loc__input:focus {
	outline: none;
	border-color: var(--mygb-hover);
	box-shadow: 0 0 0 3px rgba(43, 123, 176, .18);
}

.mygb-loc .mygb-loc__btn {
	flex: none;
	padding: 9px 15px;
	border: 0;
	box-shadow: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.2;
	color: #fff;
	background: var(--mygb-accent);
	background-image: none;
	cursor: pointer;
	transition: background-color .15s ease;
}
.mygb-loc .mygb-loc__btn:hover,
.mygb-loc .mygb-loc__btn:focus-visible { background: var(--mygb-hover); color: #fff; }
.mygb-loc .mygb-loc__btn:focus-visible { outline: 2px solid var(--mygb-hover); outline-offset: 2px; }

.mygb-loc__note {
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--mygb-ink);
	background: rgba(232, 135, 74, .1);
	border-left: 3px solid var(--mygb-accent);
	border-radius: 0 6px 6px 0;
	padding: 7px 10px;
}
.mygb-loc__note a { color: var(--mygb-hover); font-weight: 600; }

.mygb-loc__hint {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: var(--mygb-muted);
}

/* ------------------------------------------------------------------ */
/* Fallback: chip not yet portalled into the header (or no header).    */
/* Renders as a slim, full-width strip so no-JS / odd templates still  */
/* get a usable control at the top of the page.                        */
/* ------------------------------------------------------------------ */

.mygb-loc--bar {
	width: 100%;
	justify-content: center;
	background: var(--mygb-paper);
	border-bottom: 1px solid var(--mygb-line);
	padding: 2px 12px;
}
.mygb-loc.is-docked {
	width: auto;
	background: transparent;
	border-bottom: 0;
	padding: 0;
}

/* ------------------------------------------------------------------ */
/* Mobile: compact chip, popover docks as a sheet under the header     */
/* (reuses --mygb-header-bottom maintained by the megamenu script).    */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.mygb-loc__eyebrow { display: none; }
	.mygb-loc__value { max-width: 118px; font-size: 13px; }
	.mygb-loc__chip { gap: 6px; padding: 6px 6px; }
	.mygb-loc__pop {
		left: 8px !important;
		right: 8px;
		width: auto;
		top: calc(var(--mygb-header-bottom, 64px) + 8px) !important;
	}
}

/* ------------------------------------------------------------------ */
/* Price nodes                                                          */
/* ------------------------------------------------------------------ */

.mygb-price[data-state="from"] { opacity: .95; }
.mygb-price[data-state="set"] { font-weight: 700; }
.mygb-price__quote { font-weight: 600; text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Hero ZIP capture form — [mygb_hero_zip] (issue #4)                  */
/* Sits on the dark hero image; light glass card, brand-orange CTA.    */
/* ------------------------------------------------------------------ */
.mygb-herozip {
	--hz-accent: #e8874a;
	--hz-accent-hover: #f0a06a;
	--hz-ink: #1f2430;
	font-family: inherit;
	max-width: 560px;
}
.mygb-herozip__form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 22px 20px;
	background: rgba(255, 255, 255, .96);
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 16px;
	box-shadow: 0 18px 46px rgba(0, 0, 0, .32);
	backdrop-filter: blur(3px);
	text-align: left;
}
.mygb-herozip__heading {
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 800;
	line-height: 1.15;
	color: var(--hz-ink);
	letter-spacing: -.01em;
}
.mygb-herozip__sub {
	font-size: 14px;
	line-height: 1.45;
	color: #555966;
	margin-bottom: 8px;
}
.mygb-herozip__row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}
/* The field is a single bordered "input group": the pin and the input sit
   side by side as flex siblings, so the icon can never overlap the value. */
.mygb-herozip__field {
	display: flex;
	align-items: center;
	gap: 9px;
	flex: 1 1 auto;
	min-width: 0;
	height: 52px;
	padding: 0 14px;
	background: #fff;
	border: 1.5px solid #d6d9e0;
	border-radius: 10px;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.mygb-herozip__field:focus-within {
	border-color: var(--hz-accent);
	box-shadow: 0 0 0 3px rgba(232, 135, 74, .22);
}
.mygb-herozip__pin { flex: none; color: var(--hz-accent); pointer-events: none; }
/* Borderless, transparent input inside the box. Explicit resets defeat the
   Elementor kit's global input border/padding/shadow so nothing re-overlaps. */
.mygb-herozip__field .mygb-herozip__input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	box-sizing: border-box;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--hz-ink);
	font-family: inherit;
}
.mygb-herozip__field .mygb-herozip__input:focus,
.mygb-herozip__field .mygb-herozip__input:focus-visible {
	outline: none;
	border: 0;
	box-shadow: none;
}
.mygb-herozip__input::placeholder { color: #9a9ea9; font-weight: 500; letter-spacing: normal; }
.mygb-herozip__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	height: 52px;
	padding: 0 22px;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	color: #fff;
	background: var(--hz-accent);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: background .15s ease, transform .05s ease;
	white-space: nowrap;
}
.mygb-herozip__btn:hover { background: var(--hz-accent-hover); }
.mygb-herozip__btn:active { transform: translateY(1px); }
.mygb-herozip__btn[disabled] { opacity: .7; cursor: default; }
.mygb-herozip__btn.is-loading .mygb-herozip__arrow {
	animation: mygb-hz-pulse .7s ease-in-out infinite;
}
@keyframes mygb-hz-pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.mygb-herozip__note {
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #c0392b;
}
.mygb-herozip__trust {
	font-size: 12px;
	color: #6b6e7a;
	margin-top: 6px;
}
@media (max-width: 600px) {
	.mygb-herozip__row { flex-direction: column; }
	.mygb-herozip__btn { width: 100%; justify-content: center; }
}
