/**
 * 小熊移動端底部導航欄樣式 (Xiaoxiong Mobile Bottom Bar)
 * 僅在移動端寬度下生效，便於單獨維護
 *
 * @package flatsome-child-xiaoxiong
 */

/* Desktop first: always hide bar/panel on PC. */
.xmbb,
.xmbb-backdrop,
.xmbb-panel {
	display: none;
}

@media only screen and (max-width: 48em) {
	.xmbb {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1000;
		height: 56px;
		padding-bottom: env(safe-area-inset-bottom);
		background: #fff;
		border-top: 1px solid #eaeaea;
		box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.12);
		display: flex;
		align-items: stretch;
	}

	body {
		padding-bottom: calc(56px + env(safe-area-inset-bottom));
	}

	.xmbb-item {
		flex: 1;
		color: #8b8b8b;
		text-decoration: none;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 6px;
		font-weight: 600;
		font-size: 14px;
		line-height: 1;
		-webkit-tap-highlight-color: transparent;
	}

	.xmbb-icon {
		width: 26px;
		height: 26px;
		display: grid;
		place-items: center;
	}

	.xmbb-item:hover,
	.xmbb-item.is-active {
		color: #fe7d26;
	}

	.xmbb-item--hero {
		position: relative;
		margin-top: -12px;
		z-index: 2;
	}

	.xmbb-item--hero .xmbb-icon {
		width: 64px;
		height: 64px;
		overflow: hidden;
		/* background: #fff; */
		/* box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2); */
	}

	.xmbb-item--hero .xmbb-icon img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.xmbb-item--hero .xmbb-label {
		display: none;
	}

	.xmbb-label--sr {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.xmbb-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.35);
		opacity: 0;
		pointer-events: none;
		transition: opacity 180ms ease;
		z-index: 999998;
	}

	.xmbb-backdrop.is-open {
		opacity: 1;
		pointer-events: auto;
	}

	.xmbb-panel {
		display: flex;
		position: fixed;
		top: 0;
		right: 0;
		height: 100vh;
		width: min(88vw, 360px);
		background: #fff;
		transform: translateX(110%);
		transition: transform 220ms ease;
		z-index: 999999;
		flex-direction: column;
		box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
		padding-top: env(safe-area-inset-top);
		padding-bottom: env(safe-area-inset-bottom);
	}

	.xmbb-panel.is-open {
		transform: translateX(0);
	}

	.xmbb-panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px 16px 12px;
		border-bottom: 1px solid #f0f0f0;
	}

	.xmbb-panel-title {
		font-size: 16px;
		font-weight: 700;
		color: #1e1e1e;
	}

	.xmbb-panel-close {
		appearance: none;
		border: 0;
		background: transparent;
		font-size: 26px;
		line-height: 1;
		padding: 6px 10px;
		color: #8b8b8b;
		cursor: pointer;
		margin: 0;
		min-height: 38px !important;
	}

	.xmbb-panel-body {
		padding: 14px 16px 18px;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		color: #1e1e1e;
	}

	.xmbb-panel-section {
		border: 1px solid #efefef;
		border-radius: 12px;
		padding: 12px;
		margin-bottom: 12px;
	}

	.xmbb-row {
		display: grid;
		grid-template-columns: 56px 1fr;
		gap: 10px;
		padding: 8px 0;
		align-items: start;
	}

	.xmbb-k {
		color: #8b8b8b;
		font-weight: 600;
		font-size: 13px;
	}

	.xmbb-v {
		color: #2a3031;
		font-size: 14px;
		word-break: break-word;
		text-decoration: none;
	}

	.xmbb-note-title {
		font-weight: 700;
		margin-bottom: 8px;
	}

	.xmbb-note {
		margin: 0;
		padding-left: 18px;
		color: #3a3a3a;
		font-weight: 600;
		font-size: 13px;
	}

	.xmbb-wa {
		display: flex;
		align-items: center;
		gap: 10px;
		text-decoration: none;
		color: #1e1e1e;
		font-weight: 700;
	}

	.xmbb-wa-img {
		width: 40px;
		height: 40px;
		border-radius: 10px;
		background: linear-gradient(135deg, #25d366, #128c7e);
	}

	html.xmbb-lock,
	body.xmbb-lock {
		overflow: hidden;
		touch-action: none;
	}
}
