/* Best Before theme - GPS nearest branch (Gary, 16 Nov 2026). Shared across
   every "Collect from branch" surface - inserted by assets/js/nearest-branch.js,
   so this file is loaded site-wide alongside it (inc/pages/nearest-branch.php).
   Tokens only, per THEME-ARCHITECTURE rule 6. */

.bb-branch-locate {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0 0;
	padding: 8px 12px;
	min-height: 36px;
	border: 1.5px solid var(--bb-border-2);
	border-radius: var(--bb-r-control);
	background: var(--bb-surface);
	color: var(--bb-ink);
	font: 700 .8125rem/1 var(--bb-font-body);
	cursor: pointer;
}
.bb-branch-locate:hover { background: var(--bb-ground); }
.bb-branch-locate:disabled { opacity: .6; cursor: progress; }
.bb-branch-locate:focus-visible { outline: 2px solid var(--bb-ink); outline-offset: 2px; }
.bb-branch-locate svg { flex: none; color: var(--bb-ink); }

.bb-branch-locate__msg { margin: 6px 0 0; font-size: .75rem; color: var(--bb-muted); }
.bb-branch-locate__msg:empty { display: none; }

/* Distance badge next to a branch name in the fulfilment dialog's radio cards. */
.bb-branch__distance {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	padding: 1px 7px;
	border-radius: var(--bb-r-pill);
	background: var(--bb-pale-yellow);
	color: var(--bb-ink);
	font-size: .6875rem;
	font-weight: 700;
	vertical-align: middle;
}

/* The fulfilment dialog's branch-head row already lays out the label +
   search field with gap/wrap - the locate button joins that same row. */
.bb-fpanel__head { flex-wrap: wrap; }
.bb-fpanel__head .bb-branch-locate { margin-top: 0; }
.bb-fpanel__head .bb-branch-locate__msg { flex-basis: 100%; margin-top: 4px; }

/* Fulfilment dialog: "Use my location" as an icon button inside the Find-your-branch field. */
.bb-findwrap { position: relative; display: block; flex: 1 1 260px; max-width: 320px; }
.bb-findwrap [data-bbt-branch-find] { width: 100%; padding-right: 48px; }
.bb-branch-locate.bb-branch-locate--inline {
	position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
	width: 40px; height: 40px; min-height: 0; padding: 0; margin: 0;
	justify-content: center; border: 0; border-radius: 10px; background: transparent;
}
.bb-branch-locate.bb-branch-locate--inline:hover { background: var(--bb-ground); }
.bb-branch-locate.bb-branch-locate--inline svg { width: 20px; height: 20px; }
.bb-branch-locate.bb-branch-locate--inline span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .bb-findwrap { max-width: none; flex-basis: 100%; } }
.bb-findwrap .bb-fpanel__find, .bb-findwrap [data-bbt-branch-find] { width: 100% !important; max-width: none !important; margin: 0; }
.bb-branch__distance { display: inline-flex !important; width: auto !important; align-self: flex-start; justify-self: start; }
