/* Beatson's Delivery Areas. Fonts are inherited from the theme so it matches Divi. */
.bda { --bda-colour: #e0661a; --bda-accent: #e0661a; --bda-accent-text: #fff; font: inherit; color: inherit; max-width: 100%; }
.bda *, .bda *::before, .bda *::after { box-sizing: border-box; }

.bda-form { margin: 0 0 16px; }
.bda-heading { display: block; font-size: 1.25em; font-weight: 700; margin: 0 0 10px; }
.bda-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bda .bda-input {
	flex: 1 1 220px; min-width: 0; margin: 0;
	font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
	padding: 12px 14px; border: 2px solid #c9c9c9; border-radius: 6px;
	background: #fff; color: #222; text-transform: uppercase; letter-spacing: .03em;
}
.bda .bda-input::placeholder { text-transform: none; letter-spacing: 0; color: #888; }
.bda .bda-input:focus { outline: none; border-color: var(--bda-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bda-accent) 25%, transparent); }
.bda .bda-button {
	flex: 0 0 auto; margin: 0; font: inherit; font-weight: 700; font-size: 16px;
	padding: 12px 24px; border: 0; border-radius: 6px; cursor: pointer;
	background: var(--bda-accent); color: var(--bda-accent-text); transition: filter .15s;
}
.bda .bda-button:hover { filter: brightness(.92); }
.bda .bda-button:disabled { opacity: .6; cursor: wait; }

.bda-result {
	margin-top: 12px; padding: 12px 14px 12px 44px; border-radius: 6px;
	position: relative; line-height: 1.45; border-left: 4px solid;
}
.bda-result::before {
	position: absolute; left: 14px; top: 11px; width: 20px; height: 20px; border-radius: 50%;
	color: #fff; font-weight: 700; font-size: 13px; line-height: 20px; text-align: center;
}
.bda-result a { color: inherit; font-weight: 700; text-decoration: underline; }
.bda-yes   { background: #eaf6ec; border-color: #2e8540; color: #1d4d27; }
.bda-yes::before   { content: "\2713"; background: #2e8540; }
.bda-maybe { background: #fff6e0; border-color: #c98a00; color: #5c4100; }
.bda-maybe::before { content: "!"; background: #c98a00; }
.bda-no    { background: #fbeaea; border-color: #b32d2e; color: #6b1a1a; }
.bda-no::before    { content: "\00D7"; background: #b32d2e; font-size: 16px; }
.bda-loading .bda-result { opacity: .5; }

.bda-map { width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; z-index: 0; }
.bda-map .leaflet-popup-content { font: inherit; font-size: 14px; }
.bda-map a { color: inherit; }
.bda-empty { padding: 24px; color: #777; text-align: center; }
.bda-tooltip { font-weight: 700; }

.bda-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: .875em; opacity: .85; }
.bda-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bda-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--bda-colour); }
.bda-key-in   { opacity: .45; }
.bda-key-edge { opacity: .18; }

/* Stop Divi's global img/link styles leaking into Leaflet tiles */
.bda-map img { max-width: none !important; }

/* "Show all depots" map button */
.bda .bda-showall {
	font: inherit; font-size: 13px; font-weight: 700; line-height: 1;
	padding: 8px 12px; margin: 0; cursor: pointer;
	background: #fff; color: #222; border: 2px solid rgba(0,0,0,.2); border-radius: 4px;
	background-clip: padding-box;
}
.bda .bda-showall:hover { background: #f4f4f4; }
.bda-key-in { border: 2px dashed var(--bda-colour); background: color-mix(in srgb, var(--bda-colour) 40%, transparent); opacity: 1; }

/* Link to the matching branch's page, under the result message */
.bda-result .bda-branch-link { display: inline-block; margin-top: 6px; }
