/* Balloons.co.za – Belbal Range builder. Inherits your theme font. */

.bbr {
	--bbr-accent: #c8175d;
	--bbr-accent-ink: #ffffff;
	--bbr-accent-soft: #fdeaf1;
	--bbr-ink: #20222b;
	--bbr-muted: #676b78;
	--bbr-line: #e4e2ea;
	--bbr-surface: #ffffff;
	--bbr-surface-2: #f7f6fa;
	--bbr-ok: #1f7a3d;

	display: flow-root;
	width: 100%;
	color: var(--bbr-ink);
	font-size: 15px;
	line-height: 1.5;
	margin: 1rem 0 2rem;
}
.bbr *, .bbr *::before, .bbr *::after { box-sizing: border-box; }
.bbr [hidden] { display: none !important; }
.bbr button { font: inherit; color: inherit; }
.bbr-inner { container-type: inline-size; } /* bar stays outside so position:fixed works */
.bbr-loading { padding: 2rem; text-align: center; color: var(--bbr-muted); }

.bbr-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@container (min-width: 900px) {
	.bbr-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

/* ---------- Divi spacing fix: no big gap above the builder ---------- */
.et_pb_section:has(.bbr) { padding-top: 16px !important; }
.et_pb_row:has(.bbr) { padding-top: 0 !important; }
.et_pb_module:has(.bbr) { margin-top: 0 !important; }
.et_pb_code_inner > p:empty, .et_pb_code_inner > br,
.et_pb_text_inner > p:empty,
p:empty:has(+ .bbr), .bbr + p:empty { display: none !important; }

/* ---------- Steps ---------- */
.bbr-step { margin: 0 0 1.75rem; }
.bbr-step__title {
	display: flex; align-items: center; gap: .65rem;
	margin: 0 0 .85rem; padding: 0;
	font-size: 1.2rem; font-weight: 700; line-height: 1.25; color: var(--bbr-ink);
}
.bbr-step__num {
	flex: 0 0 auto;
	display: inline-grid; place-items: center;
	width: 32px; height: 32px; border-radius: 50%;
	background: var(--bbr-accent); color: var(--bbr-accent-ink);
	font-size: .95rem; font-weight: 700;
}
.bbr-help { margin: -.3rem 0 .9rem; color: var(--bbr-muted); font-size: .9rem; padding: 0; }

/* ---------- Balloons (CSS drawn) ---------- */
.bbr-balloon {
	--c: #ccc;
	position: relative; display: inline-block; flex: 0 0 auto;
	width: 34px; height: 42px; margin-bottom: 7px;
	border-radius: 50% 50% 48% 48% / 44% 44% 56% 56%;
	background:
		radial-gradient(ellipse 30% 22% at 34% 26%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
		radial-gradient(circle at 62% 72%, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 60%),
		var(--c);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
	transition: transform .2s ease;
}
.bbr-balloon::after {
	content: ""; position: absolute; left: 50%; bottom: -5px;
	width: 8px; height: 6px; transform: translateX(-50%);
	background: var(--c); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: brightness(.85);
}
.bbr-balloon--glossy {
	background:
		radial-gradient(ellipse 22% 14% at 30% 22%, #fff, rgba(255, 255, 255, 0) 75%),
		linear-gradient(165deg, color-mix(in srgb, var(--c) 35%, #fff) 0%, var(--c) 28%, color-mix(in srgb, var(--c) 55%, #000) 48%, color-mix(in srgb, var(--c) 45%, #fff) 66%, var(--c) 82%, color-mix(in srgb, var(--c) 60%, #000) 100%);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.bbr-balloon--metallic {
	background:
		radial-gradient(ellipse 26% 18% at 32% 24%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
		linear-gradient(150deg, color-mix(in srgb, var(--c) 55%, #fff) 0%, var(--c) 42%, color-mix(in srgb, var(--c) 72%, #000) 78%, color-mix(in srgb, var(--c) 80%, #fff) 100%);
}
.bbr-balloon--xs { width: 16px; height: 20px; margin: 0 0 3px; }
.bbr-balloon--xs::after { width: 5px; height: 4px; bottom: -3px; }

/* ---------- Range cards ---------- */
.bbr-ranges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
@container (max-width: 560px) { .bbr-ranges { grid-template-columns: 1fr; } }
.bbr-range {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
	padding: 1rem; text-align: left; cursor: pointer;
	border: 2px solid var(--bbr-line); border-radius: 14px; background: var(--bbr-surface);
	transition: border-color .15s, box-shadow .15s;
}
.bbr-range:hover { border-color: color-mix(in srgb, var(--bbr-accent) 45%, var(--bbr-line)); }
.bbr-range[aria-pressed="true"] { border-color: var(--bbr-accent); box-shadow: 0 0 0 3px var(--bbr-accent-soft); }
.bbr-range__balloons { display: flex; gap: 4px; margin-bottom: .5rem; }
.bbr-range__balloons .bbr-balloon { width: 24px; height: 30px; }
.bbr-range__balloons .bbr-balloon:nth-child(even) { transform: translateY(5px); }
.bbr-range__name { font-weight: 700; font-size: 1.1rem; }
.bbr-range__tag { color: var(--bbr-muted); font-size: .875rem; }
.bbr-range__meta { font-size: .85rem; font-weight: 600; color: var(--bbr-accent); margin-top: .25rem; }
.bbr-range__count, .bbr-size__count {
	position: absolute; top: .55rem; right: .55rem;
	padding: .05rem .5rem; border-radius: 99px;
	background: var(--bbr-ok); color: #fff; font-size: .72rem; font-weight: 700;
}

/* ---------- Sizes ---------- */
.bbr-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.bbr-size {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: .05rem;
	padding: .8rem .5rem .7rem; cursor: pointer; text-align: center;
	border: 2px solid var(--bbr-line); border-radius: 12px; background: var(--bbr-surface);
}
.bbr-size:hover { border-color: color-mix(in srgb, var(--bbr-accent) 45%, var(--bbr-line)); }
.bbr-size[aria-pressed="true"] { border-color: var(--bbr-accent); box-shadow: 0 0 0 3px var(--bbr-accent-soft); }
.bbr-size__pic { height: 52px; display: flex; align-items: flex-end; margin-bottom: .35rem; }
.bbr-size__label { font-weight: 800; font-size: 1.15rem; }
.bbr-size__cm { font-size: .78rem; color: var(--bbr-muted); }
.bbr-size__price { font-size: .82rem; font-weight: 600; color: var(--bbr-accent); }
.bbr-size__count { top: .35rem; right: .35rem; font-size: .66rem; }

.bbr-packs { margin-top: .9rem; }
.bbr-packs__title { margin: 0 0 .4rem; padding: 0; font-weight: 700; font-size: .9rem; }
.bbr-packs__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.bbr-pack {
	display: flex; flex-direction: column; align-items: center;
	padding: .5rem .25rem; border-radius: 10px;
	background: var(--bbr-surface-2); border: 1px solid var(--bbr-line);
}
.bbr-pack.is-on { background: var(--bbr-accent-soft); border-color: var(--bbr-accent); }
.bbr-pack__qty { font-size: .78rem; color: var(--bbr-muted); font-weight: 600; }
.bbr-pack__price { font-weight: 800; font-size: 1.05rem; }
.bbr-pack__each { font-size: .7rem; color: var(--bbr-muted); }

/* ---------- Colour grid ---------- */
.bbr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .6rem; }
.bbr-tile {
	display: flex; flex-direction: column;
	border: 2px solid var(--bbr-line); border-radius: 12px; background: var(--bbr-surface);
	overflow: hidden; transition: border-color .15s;
}
.bbr-tile.is-on { border-color: var(--bbr-accent); background: var(--bbr-accent-soft); }
.bbr-tile__pick {
	position: relative; display: flex; flex-direction: column; align-items: center;
	padding: .75rem .35rem .55rem; border: 0; background: none; cursor: pointer; text-align: center; width: 100%;
}
.bbr-tile:not(.is-on) .bbr-tile__pick:hover .bbr-balloon { transform: translateY(-3px) rotate(-4deg); }
.bbr-tile.is-on .bbr-balloon { transform: translateY(-3px) rotate(-4deg); }
.bbr-tile__new {
	position: absolute; top: .35rem; right: .35rem;
	padding: .05rem .35rem; border-radius: 99px; background: #1e5bb8; color: #fff;
	font-size: .62rem; font-weight: 800; letter-spacing: .03em;
}
.bbr-tile__code { font-size: .72rem; color: var(--bbr-muted); font-weight: 600; }
.bbr-tile__name { font-size: .85rem; font-weight: 600; line-height: 1.2; }

.bbr-qty { display: flex; align-items: stretch; border-top: 1px solid color-mix(in srgb, var(--bbr-accent) 30%, var(--bbr-line)); }
.bbr-qty__btn {
	flex: 0 0 34px; border: 0; background: var(--bbr-surface); cursor: pointer;
	font-size: 1.15rem; font-weight: 700; line-height: 1; padding: .35rem 0;
}
.bbr-qty__btn:hover { background: var(--bbr-accent); color: #fff !important; }
.bbr-qty__input {
	flex: 1 1 auto; min-width: 0; width: 100%; border: 0; border-left: 1px solid var(--bbr-line); border-right: 1px solid var(--bbr-line);
	text-align: center; font: inherit; font-weight: 700; padding: .3rem 0; background: var(--bbr-surface); color: var(--bbr-ink);
	-moz-appearance: textfield; appearance: textfield;
}
.bbr-qty__input::-webkit-outer-spin-button,
.bbr-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Helium & extras ---------- */
.bbr-addons { display: grid; gap: .6rem; }
.bbr-addon {
	display: grid; grid-template-columns: 56px minmax(0, 1fr) 132px; align-items: center; gap: .85rem;
	padding: .75rem; border: 2px solid var(--bbr-line); border-radius: 12px; background: var(--bbr-surface);
}
.bbr-addon.is-on { border-color: var(--bbr-accent); background: var(--bbr-accent-soft); }
.bbr-addon__img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--bbr-surface-2); display: grid; place-items: center; font-size: 1.6rem; }
.bbr-addon__info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.bbr-addon__name { font-weight: 700; line-height: 1.25; }
.bbr-addon__price { font-size: .85rem; color: var(--bbr-muted); }
.bbr-addon__price strong { color: var(--bbr-ink); }
.bbr-addon__var { max-width: 20rem; padding: .3rem .45rem; border: 1px solid var(--bbr-line); border-radius: 8px; font: inherit; font-size: .82rem; background: var(--bbr-surface); color: var(--bbr-ink); }
.bbr-addon__hint { margin: .3rem 0 0; padding: .35rem .55rem; border-radius: 8px; background: #fff4e5; color: #8a4300; font-size: .82rem; }
.bbr-addon__hint strong { color: var(--bbr-ok); }
.bbr-addon__set { border: 0; border-radius: 99px; padding: .15rem .7rem; margin-left: .2rem; background: var(--bbr-accent); color: #fff !important; font-weight: 700; font-size: .8rem; cursor: pointer; }
.bbr-qty--addon { border: 1px solid var(--bbr-line); border-radius: 10px; overflow: hidden; border-top-width: 1px; }
.bbr-help--after { margin: .6rem 0 0; }
@container (max-width: 520px) {
	.bbr-addon { grid-template-columns: 48px minmax(0, 1fr); }
	.bbr-addon__img { width: 48px; height: 48px; }
	.bbr-qty--addon { grid-column: 1 / -1; }
}

/* ---------- Order panel ---------- */
.bbr-panel {
	border: 1px solid var(--bbr-line); border-radius: 16px; background: var(--bbr-surface);
	padding: 1.1rem 1.1rem 1rem; box-shadow: 0 6px 24px rgba(20, 20, 40, .07);
	scroll-margin-top: 120px;
}
.bbr-panel__title { margin: 0 0 .75rem; padding: 0; font-size: 1.25rem; font-weight: 700; color: var(--bbr-ink); }
.bbr-panel__empty { color: var(--bbr-muted); font-size: .9rem; margin: 0 0 .75rem; padding: 0; }
.bbr-group { padding: .6rem 0 .7rem; border-bottom: 1px solid var(--bbr-line); }
.bbr-group:first-child { padding-top: 0; }
.bbr-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.bbr-group__name { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: var(--bbr-line); text-underline-offset: 3px; }
.bbr-group__sum { font-weight: 700; white-space: nowrap; }
.bbr-group__info { margin: .3rem 0 0; padding: 0; font-size: .82rem; color: var(--bbr-muted); }
.bbr-lines { list-style: none; margin: .4rem 0 0; padding: 0; }
.bbr-line { display: flex; align-items: center; gap: .45rem; padding: .15rem 0; font-size: .87rem; margin: 0; }
.bbr-line__name { flex: 1 1 auto; min-width: 0; }
.bbr-line__qty { font-weight: 600; white-space: nowrap; }
.bbr-line__remove { border: 0; background: none; color: var(--bbr-muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .1rem .3rem; border-radius: 6px; }
.bbr-line__remove:hover { color: #b3261e; background: var(--bbr-surface-2); }
.bbr-nudge { margin: .45rem 0 0; padding: .4rem .6rem; border-radius: 8px; background: #fff4e5; color: #8a4300; font-size: .82rem; font-weight: 600; }
.bbr-panel__total { display: flex; justify-content: space-between; align-items: baseline; margin: .8rem 0 .8rem; font-size: 1rem; }
.bbr-panel__total strong { font-size: 1.35rem; }
.bbr-add {
	display: block; width: 100%; padding: .85rem 1rem; border: 0; border-radius: 99px; cursor: pointer;
	background: var(--bbr-accent); color: var(--bbr-accent-ink) !important; font-weight: 700; font-size: 1.02rem;
}
.bbr-add:hover:not(:disabled) { filter: brightness(1.08); }
.bbr-add:disabled { opacity: .45; cursor: not-allowed; }
.bbr-clear {
	display: block; width: 100%; margin-top: .45rem; padding: .45rem; border: 0; background: none; cursor: pointer;
	color: var(--bbr-muted); font-size: .85rem; text-decoration: underline;
}
.bbr-panel__note { margin: .7rem 0 0; padding: 0; font-size: .8rem; color: var(--bbr-muted); line-height: 1.45; }

/* ---------- Phone bottom bar ---------- */
.bbr-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
	display: flex; align-items: center; justify-content: space-between; gap: .75rem;
	padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
	background: var(--bbr-ink); color: #fff; box-shadow: 0 -4px 16px rgba(0, 0, 0, .18);
}
.bbr-bar__info { font-weight: 600; font-size: .95rem; }
.bbr-bar__btn { border: 0; border-radius: 99px; padding: .55rem 1.1rem; background: var(--bbr-accent); color: #fff !important; font-weight: 700; cursor: pointer; }
@media (min-width: 981px) { .bbr-bar { display: none !important; } }
@media (max-width: 980px) { .bbr { padding-bottom: 3.5rem; } }

@media (prefers-reduced-motion: reduce) {
	.bbr-balloon, .bbr-range, .bbr-tile { transition: none; }
}

.bbr-airnote { margin: .6rem 0 0; padding: .5rem .75rem; border-radius: 10px; background: #eef7ff; color: #0b4a7a; font-size: .86rem; font-weight: 600; }
