/* Bubble Header – front end. All values come from the dashboard as CSS variables. */
.bh-header {
	width: 100%;
	box-sizing: border-box;
	background-color: var(--bh-bg, #fff);
	/* Padding and space below are set per header (they change between computer and phone). */
}

.bh-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.bh-left,
.bh-right {
	display: flex;
	align-items: center;
}

.bh-logo-link { display: block; line-height: 0; }

.bh-logo-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
}

.bh-logo,
.bh-logo-anim {
	display: block;
	height: var(--bh-logo-h, 80px);
	width: auto;
	max-width: none;
	-webkit-user-drag: none;
}

/* Animation layer sits on top of the still logo; only one of the two is visible at a time. */
.bh-logo-anim {
	position: absolute;
	top: 0;
	left: 0;
	visibility: hidden;
	pointer-events: none;
}

.bh-logo-wrap.is-anim .bh-logo-anim { visibility: visible; }
.bh-logo-wrap.is-anim .bh-logo { visibility: hidden; }

/* ---------------------------------------------------------------- Menu */
.bh-menu {
	position: relative;
	width: var(--bh-size, 80px);
	height: var(--bh-size, 80px);
}

.bh-toggle,
.bh-li {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--bh-size, 80px);
	height: var(--bh-size, 80px);
}

.bh-circle,
.bh-label-img {
	position: absolute;
	inset: -0.5px;
	width: calc(100% + 1px);
	height: calc(100% + 1px);
	max-width: none;
	margin: 0;
	border-radius: 50%;
	pointer-events: none;
	-webkit-user-drag: none;
}

/* Menu button */
.bh-toggle {
	z-index: 2;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bh-btn-bg, #fff);
	color: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transform: scale(var(--bh-btn-scale, 1.1));
	transition:
		transform var(--bh-btn-ms, 400ms) cubic-bezier(0.175, 0.885, 0.32, 1.275),
		box-shadow var(--bh-btn-ms, 400ms) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bh-shadows .bh-toggle { box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.14); }

.bh-toggle:hover { transform: scale(var(--bh-btn-hover, 1.2)); }
.bh-shadows .bh-toggle:hover { box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.14); }

.bh-menu.is-open .bh-toggle {
	transform: scale(var(--bh-btn-open, 0.8));
	box-shadow: none;
	transition: transform 200ms linear, box-shadow 200ms linear;
}

.bh-toggle:focus-visible,
.bh-item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Hamburger lines → cross */
.bh-line {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 50%;
	width: var(--bh-line-w, 25px);
	height: var(--bh-line-t, 3px);
	margin-left: calc(var(--bh-line-w, 25px) / -2);
	margin-top: calc(var(--bh-line-t, 3px) / -2);
	background: var(--bh-line, #000);
	transition: transform 200ms;
}

.bh-line-1 { transform: translateY(calc(var(--bh-line-gap, 8px) * -1)); }
.bh-line-3 { transform: translateY(var(--bh-line-gap, 8px)); }

.bh-menu.is-open .bh-line-1 { transform: rotate(45deg); }
.bh-menu.is-open .bh-line-2 { transform: scale(0.1, 1); }
.bh-menu.is-open .bh-line-3 { transform: rotate(-45deg); }

/* Bubbles */
.bh-items {
	position: absolute;
	inset: 0;
	z-index: 1;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bh-li {
	margin: 0;
	transform: translate3d(0, 0, 0);
	transition: transform var(--bh-close-ms, 180ms) ease-out;
}

.bh-menu.is-open .bh-li {
	transform: translate3d(var(--bh-x, 0px), var(--bh-y, 0px), 0);
	transition-duration: var(--bh-open-ms, 380ms);
	transition-timing-function: var(--bh-ease, cubic-bezier(0.935, 0, 0.34, 1.33));
}

.bh-item {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	color: inherit;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.bh-face {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--bh-bubble-bg, #fff);
	transition: background-color 150ms ease, transform 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bh-shadows .bh-face { box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.14); }

.bh-item:hover .bh-face,
.bh-item:focus-visible .bh-face {
	background: var(--bh-bubble-hover, #eee);
	transform: scale(var(--bh-bubble-scale, 1));
}

.bh-label-text {
	font-size: 14px;
	line-height: 1.1;
	padding: 6px;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.bh-toggle,
	.bh-li,
	.bh-menu.is-open .bh-li,
	.bh-line,
	.bh-face {
		transition-duration: 1ms !important;
	}
}

/* No focus rectangle after a mouse click or tap; keyboard users still get the outline above. */
.bh-header a:focus:not(:focus-visible),
.bh-header button:focus:not(:focus-visible),
.bh-header img:focus {
	outline: none !important;
}

.bh-logo-link { -webkit-tap-highlight-color: transparent; }
