/**
 * Mobile Bottom Navigation Bar + Slide-out Menu Panel
 * Only visible on mobile (max-width: 767px).
 *
 * @package HTA\LiveEvent
 * @since 1.0.19
 */

/* ── Hide BuddyBoss header on mobile ────────────────────────── */
@media (max-width: 767px) {
	.site-header,
	.site-header-wrap,
	.header-wrap,
	.bb-header,
	.bb-header-wrap,
	.bb-header--main,
	.bb-header--sticky,
	.header-outer-wrap,
	.header-inner-wrap,
	#masthead,
	header.site-header,
	header.header,
	.elementor-location-header,
	[data-elementor-type="header"],
	.bb-mobile-header-wrapper,
	.bb-mobile-header,
	.bb-mobile-panel-wrapper {
		display: none !important;
	}

	/* Prevent gap left behind by hidden header */
	body {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}
	.site-content {
		padding-top: 0 !important;
	}
	/* Reserve bottom space so content doesn't hide behind nav bar */
	body {
		padding-bottom: 50px !important;
	}
}

/* ── Bottom Navigation Bar ──────────────────────────────────── */
.hta-bottom-nav {
	display: none;
}

@media (max-width: 767px) {
	.hta-bottom-nav {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: 50px;
		background: rgba(249, 250, 251, 0.92);
		-webkit-backdrop-filter: saturate(180%) blur(20px);
		backdrop-filter: saturate(180%) blur(20px);
		border-top: 0.5px solid rgba(0, 0, 0, 0.08);
		z-index: 100000;
		align-items: stretch;
		justify-content: space-around;
		padding: 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}

.hta-bottom-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	flex: 1;
	height: 100%;
	text-decoration: none !important;
	color: #8e8e93;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.01em;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.2s ease;
	cursor: pointer;
	background: none;
	border: none;
	padding: 4px 0 2px;
	outline: none;
	position: relative;
}

.hta-bottom-nav-item svg {
	width: 24px;
	height: 24px;
	stroke-width: 1.6;
	flex-shrink: 0;
	transition: color 0.2s ease;
}

/* Override inherited line-height on <a> tags so the label matches <button> sizing */
.hta-bottom-nav-item span {
	line-height: 1.3;
}

.hta-bottom-nav-item.active {
	color: #E76E3C;
}
.hta-bottom-nav-item.active svg {
	color: #E76E3C;
}

/* ── Slide-out Menu Panel ───────────────────────────────────── */
.hta-menu-panel-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.hta-menu-panel-overlay.hta-panel-open {
	opacity: 1;
	visibility: visible;
}

.hta-menu-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 85%;
	max-width: 320px;
	z-index: 100002;
	background: #fff;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
}
.hta-menu-panel.hta-panel-open {
	transform: translateX(0);
}

/* ── Profile card (top of sidebar) ──────────────────────────── */
.hta-menu-panel-profile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem;
	background: linear-gradient(135deg, #fef7f3 0%, #fff 100%);
	border-bottom: 1px solid #f1f5f9;
}
.hta-menu-profile-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}
.hta-menu-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid #E76E3C;
}
.hta-menu-profile-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.hta-menu-profile-name {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hta-menu-profile-email {
	font-size: 12px;
	color: #8e8e93;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hta-menu-login-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: #E76E3C;
	border-radius: 0.5rem;
	text-decoration: none !important;
	transition: opacity 0.15s;
}
.hta-menu-login-btn:active {
	opacity: 0.85;
}
.hta-menu-login-btn svg {
	stroke: #fff;
}
.hta-menu-panel-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	color: #6b7280;
	border-radius: 0.5rem;
	transition: background 0.15s;
	flex-shrink: 0;
}
.hta-menu-panel-close:active {
	background: rgba(0, 0, 0, 0.06);
}

/* ── Navigation list ────────────────────────────────────────── */
.hta-menu-panel-nav {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Menu list */
.hta-menu-panel-list {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
}
.hta-menu-panel-list li {
	margin: 0;
}
.hta-menu-panel-list a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1.25rem;
	font-size: 15px;
	font-weight: 500;
	color: #334155;
	text-decoration: none !important;
	transition: background 0.15s;
	border-left: 3px solid transparent;
}
.hta-menu-panel-list a:active,
.hta-menu-panel-list a:hover {
	background: #fef7f3;
	border-left-color: #E76E3C;
	color: #E76E3C;
}
.hta-menu-panel-list .current-menu-item > a,
.hta-menu-panel-list .current_page_item > a {
	color: #E76E3C;
	border-left-color: #E76E3C;
	background: #fef7f3;
	font-weight: 700;
}

/* Sub-menu indent */
.hta-menu-panel-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hta-menu-panel-list .sub-menu a {
	padding-left: 2.5rem;
	font-size: 14px;
	font-weight: 400;
	color: #64748b;
}
.hta-menu-panel-list .sub-menu a:active,
.hta-menu-panel-list .sub-menu a:hover {
	color: #E76E3C;
}

/* ── Footer section (account + logout) ──────────────────────── */
.hta-menu-panel-footer {
	padding: 0.75rem 1.25rem 1.25rem;
	padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid #f1f5f9;
}
.hta-menu-footer-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.625rem 0;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
	text-decoration: none !important;
	transition: color 0.15s;
}
.hta-menu-footer-link:active,
.hta-menu-footer-link:hover {
	color: #E76E3C;
}
.hta-menu-footer-link svg {
	flex-shrink: 0;
}
.hta-menu-logout {
	color: #94a3b8;
}
