/* ─── HKSM Bottom Navigation ─────────────────────────────────── */

.hksm-bottom-nav {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	background: #fff;
	border-top: 1px solid #e0e0e0;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
	justify-content: space-around;
	align-items: center;
	padding: 6px 0 max(6px, env(safe-area-inset-bottom));
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 820px) {
	.hksm-bottom-nav {
		display: flex;
	}
	body {
		padding-bottom: 72px;
	}
}

.hksm-nav-tab {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	gap: 2px;
	padding: 6px 4px;
	text-decoration: none;
	color: #666;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	background: none;
	border: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.hksm-nav-badge {
	position: absolute;
	top: 2px;
	right: calc(50% - 22px);
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e53935;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.hksm-nav-badge.is-hidden {
	display: none;
}

.hksm-nav-tab:hover,
.hksm-nav-tab:focus,
.hksm-nav-tab.active {
	color: #0066cc;
	outline: none;
}

.hksm-nav-tab.active {
	font-weight: 600;
}

.hksm-nav-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* ─── Panels sit ABOVE tab bar ───────────────────────────────── */

.hksm-panel {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 60px; /* above the tab bar */
	z-index: 99998; /* below the nav bar */
	background: #f7f8fa;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	display: none;
	flex-direction: column;
}

.hksm-panel[aria-hidden="false"] {
	display: flex;
}

.hksm-answer-card--welcome {
	margin-bottom: 12px;
}

@media (min-width: 821px) {
	.hksm-panel {
		display: none !important;
	}
}

/* Account for safe-area on iPhones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
	.hksm-panel {
		bottom: calc(60px + env(safe-area-inset-bottom));
	}
}

.hksm-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #fff;
	border-bottom: 1px solid #eee;
	position: sticky;
	top: 0;
	z-index: 10;
	flex-shrink: 0;
}

.hksm-panel-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
}

.hksm-panel-header p {
	margin: 2px 0 0;
	font-size: 13px;
	color: #888;
}

.hksm-panel-close {
	width: 36px;
	height: 36px;
	border: none;
	background: #f0f0f0;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hksm-panel-close:hover {
	background: #e0e0e0;
}

/* Prevent iOS zoom on inputs */
@media (max-width: 991.98px) {
	.hksm-panel input[type="text"],
	.hksm-panel input[type="email"],
	.hksm-panel input[type="tel"],
	.hksm-panel input[type="search"],
	.hksm-panel textarea,
	.hksm-panel select {
		font-size: 16px !important;
	}

	/* Hide footer sections only on mobile WooCommerce My Account pages */
	.woocommerce-account .hksm-cta,
	.woocommerce-account .hksm-features,
	.woocommerce-account .hksm-footer,
	.woocommerce-account footer.hksm-footer,
	.hksm-ai-account-page .hksm-cta,
	.hksm-ai-account-page .hksm-features,
	.hksm-ai-account-page .hksm-footer,
	.hksm-ai-account-page footer.hksm-footer {
		display: none !important;
	}
}
