/* ==== Frontend: bottom nav bar ==== */

.smbn-bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Tablet and mobile only — hidden above Flatsome's default tablet breakpoint (850px).
   Adjust this value to match Appearance > Theme Options > Responsive if it's been changed. */
@media (min-width: 850px) {
	.smbn-bottom-nav {
		display: none;
	}
}

.smbn-bar {
	display: flex;
	align-items: center;
	justify-content: space-around;
	background: var(--smbn-bar-bg, #ffffff);
	border-top: 1px solid #e5e5e5;
	min-height: calc(var(--smbn-bar-height, 64px) + env(safe-area-inset-bottom, 0px));
	padding: 0 8px env(safe-area-inset-bottom, 0px);
	box-sizing: border-box;
	position: relative;
	z-index: 1;
}

.smbn-bar-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	color: var(--smbn-text-color, #6b6b6b);
	text-decoration: none;
	font-size: var(--smbn-bar-label-size, 11px);
	flex: 1;
	-webkit-tap-highlight-color: transparent;
}

.smbn-bar-item span {
	margin-top: 2px;
}

.smbn-bar-item i {
	font-size: var(--smbn-icon-size, 22px);
}

/* .smbn-bar-item:hover {
	color: #222;
} */

/* Inline filled SVGs sit where the webfont <i> would, at the same size. */
.smbn-svg {
	width: var(--smbn-icon-size, 22px);
	height: var(--smbn-icon-size, 22px);
	min-width: var(--smbn-icon-size, 22px);
	min-height: var(--smbn-icon-size, 22px);
	max-width: var(--smbn-icon-size, 22px);
	max-height: var(--smbn-icon-size, 22px);
	display: block;
	flex-shrink: 0;
	fill: currentColor;
}

.smbn-bubble-icon .smbn-svg {
	width: 18px;
	height: 18px;
	min-width: 18px;
	min-height: 18px;
	max-width: 18px;
	max-height: 18px;
}

/* Pin link colors first so tapping never flashes the browser default. */
.smbn-bar-item,
.smbn-bar-item:link,
.smbn-bar-item:visited,
.smbn-bar-item:hover,
.smbn-bar-item:active {
	color: var(--smbn-text-color, #6b6b6b);
}

.smbn-bubble-item:link .smbn-bubble-icon,
.smbn-bubble-item:visited .smbn-bubble-icon,
.smbn-bubble-item:hover .smbn-bubble-icon,
.smbn-bubble-item:active .smbn-bubble-icon {
	color: var(--smbn-text-color, #6b6b6b);
}

.smbn-bubble-item:link .smbn-bubble-label,
.smbn-bubble-item:visited .smbn-bubble-label,
.smbn-bubble-item:hover .smbn-bubble-label,
.smbn-bubble-item:active .smbn-bubble-label {
	color: var(--smbn-text-color, #6b6b6b);
}

/* Active bar item: filled SVG picks up the accent color. */
.smbn-bar-item.is-active,
.smbn-bar-item.is-active:link,
.smbn-bar-item.is-active:visited,
.smbn-bar-item.is-active:hover,
.smbn-bar-item.is-active:active {
	color: var(--smbn-accent, #1d4ed8);
}

.smbn-bar-item.is-active span {
	font-weight: 500;
}

/* Active bubble item: inverted circle, glyph stays outline. */
.smbn-bubble-item.is-active .smbn-bubble-icon {
	background: var(--smbn-accent, #1d4ed8);
	border-color: var(--smbn-accent, #1d4ed8);
	color: #ffffff;
}

.smbn-bubble-item.is-active .smbn-bubble-label {
	color: var(--smbn-accent, #1d4ed8);
	font-weight: 500;
}

/* ==== Frontend: center FAB button ==== */
.smbn-fab-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	flex: 1;
	cursor: pointer;
	font-size: var(--smbn-bar-label-size, 11px);
	font-family: inherit;
	color: var(--smbn-text-color, #6b6b6b);
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.smbn-fab {
	width: var(--smbn-fab-size, 52px);
	height: var(--smbn-fab-size, 52px);
	border-radius: 50%;
	background: var(--smbn-accent, #1d4ed8);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: calc(var(--smbn-fab-size, 52px) / -2);
	border: 3px solid var(--smbn-bar-bg, #ffffff);
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.smbn-fab i {
	font-size: calc(var(--smbn-fab-size, 52px) * 0.44);
	color: #ffffff;
}

.smbn-fab-wrap[aria-expanded="true"] .smbn-fab {
	transform: rotate(45deg) scale(0.94);
}

.smbn-fab-label {
	margin-top: 2px;
}

/* ==== Frontend: bubble popup ==== */
.smbn-bubble {
	position: absolute;
	left: 50%;
	bottom: calc(var(--smbn-bar-height, 64px) + env(safe-area-inset-bottom, 0px) + 20px);
	transform: translateX(-50%) translateY(8px) scale(0.92);
	transform-origin: bottom center;
	opacity: 0;
	pointer-events: none;
	transition: transform 0.24s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.16s ease;
	z-index: 2;
}

.smbn-bubble.is-open {
	opacity: 1;
	transform: translateX(-50%) translateY(0) scale(1);
	pointer-events: auto;
}

.smbn-bubble-inner {
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 20px;
	padding: 12px 14px 10px;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-around;
	width: 320px;
	box-sizing: border-box;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Tablet: wider bubble between 601px and the 850px cutoff where the nav hides. */
@media (min-width: 601px) {
	.smbn-bubble-inner {
		width: 420px;
	}
}

.smbn-bubble-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	width: 46px;
	flex-shrink: 0;
	-webkit-tap-highlight-color: transparent;
	opacity: 0;
	transform: translateY(8px) scale(0.7);
	transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
	transition-delay: 0s;
}

.smbn-bubble.is-open .smbn-bubble-item {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.smbn-bubble.is-open .smbn-bubble-item:nth-child(1) { transition-delay: 0.06s; }
.smbn-bubble.is-open .smbn-bubble-item:nth-child(2) { transition-delay: 0.095s; }
.smbn-bubble.is-open .smbn-bubble-item:nth-child(3) { transition-delay: 0.13s; }
.smbn-bubble.is-open .smbn-bubble-item:nth-child(4) { transition-delay: 0.165s; }
.smbn-bubble.is-open .smbn-bubble-item:nth-child(5) { transition-delay: 0.2s; }
.smbn-bubble.is-open .smbn-bubble-item:nth-child(6) { transition-delay: 0.235s; }

.smbn-bubble-icon {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e5e5e5;
	color: var(--smbn-text-color, #6b6b6b);
	margin-bottom: 4px;
}

.smbn-bubble-icon i {
	font-size: 18px;
}

.smbn-bubble-label {
	font-size: var(--smbn-bubble-label-size, 10px);
	color: var(--smbn-text-color, #6b6b6b);
	text-align: center;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60px;
}

.smbn-bubble-tail {
	position: absolute;
	left: 50%;
	bottom: -9px;
	transform: translateX(-50%);
}

.smbn-bubble-tail path {
	fill: #ffffff;
	stroke: #e5e5e5;
	stroke-width: 0.5;
}

/* ==== Admin: settings page repeater ==== */
.smbn-settings .smbn-repeater {
	margin-bottom: 8px;
}

.smbn-settings .smbn-repeater th,
.smbn-settings .smbn-repeater td {
	padding: 8px 10px;
}

.smbn-settings .smbn-remove-row {
	color: #b32d2e;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
}

.smbn-icon-field {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.smbn-icon-preview {
	font-size: 20px;
	color: #444;
	width: 22px;
	text-align: center;
	flex-shrink: 0;
}

.smbn-icon-input {
	width: 150px;
}
