/**
 * Stiva YGO Mobile Bottom Navigation Bar Styles
 *
 * Sticky bottom app bar on mobile viewports (<= 768px).
 * Uses the original crisp vector SVGs from images/icons-stivaoh/ with refined glassmorphism & active indicators.
 */

.stiva-mobile-bottom-bar {
	display: none;
}

@media (max-width: 768px) {
	/* Pad body so content is not obscured by bottom bar */
	body {
		padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
	}

	/* Hide on checkout page for clean checkout focus */
	body.woocommerce-checkout .stiva-mobile-bottom-bar {
		display: none !important;
	}

	.stiva-mobile-bottom-bar {
		display: flex !important;
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		min-height: 76px !important;
		background: rgba(255, 255, 255, 0.97) !important;
		backdrop-filter: blur(14px) !important;
		-webkit-backdrop-filter: blur(14px) !important;
		border-top: 1px solid rgba(20, 18, 17, 0.08) !important;
		box-shadow: 0 -6px 24px rgba(20, 18, 17, 0.08) !important;
		z-index: 9990 !important;
		align-items: stretch !important;
		justify-content: space-around !important;
		padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
		box-sizing: border-box !important;
		overflow: visible !important;
	}

	.stiva-bottom-tab {
		position: relative !important;
		flex: 1 1 0% !important;
		min-width: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: flex-end !important;
		color: #6e737b !important;
		text-decoration: none !important;
		font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif !important;
		padding: 4px 2px 2px !important;
		margin: 0 !important;
		gap: 5px !important;
		transition: color 0.22s ease, transform 0.22s ease !important;
		background: transparent !important;
		border: none !important;
		cursor: pointer !important;
		box-sizing: border-box !important;
		-webkit-tap-highlight-color: transparent !important;
	}

	/* Top active accent line for regular tabs */
	.stiva-bottom-tab:not(.stiva-bottom-tab--center)::after {
		content: '' !important;
		position: absolute !important;
		top: -8px !important;
		left: 22% !important;
		right: 22% !important;
		height: 3px !important;
		border-radius: 0 0 4px 4px !important;
		background: transparent !important;
		transition: background-color 0.22s ease, transform 0.22s ease !important;
		transform: scaleX(0.6) !important;
	}

	.stiva-bottom-tab-icon-wrap {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 38px !important;
		height: 34px !important;
		border-radius: 10px !important;
		transition: background-color 0.22s ease, transform 0.22s ease !important;
	}

	.stiva-bottom-tab-img {
		width: 32px !important;
		height: 32px !important;
		max-width: 32px !important;
		max-height: 32px !important;
		display: block !important;
		object-fit: contain !important;
		margin: 0 auto !important;
		transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
	}

	/* ==========================================================================
	   Center "STORE" Docked Medallion / Half-Circle Dome
	   ========================================================================== */
	.stiva-bottom-tab--center {
		z-index: 2 !important;
		justify-content: flex-end !important;
		overflow: visible !important;
	}

	.stiva-bottom-tab-center-dome {
		position: relative !important;
		margin-top: -26px !important;
		width: 60px !important;
		height: 60px !important;
		border-radius: 50% !important;
		background: #ffffff !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		box-shadow: 0 -5px 14px rgba(20, 18, 17, 0.09), 0 4px 12px rgba(220, 18, 18, 0.14) !important;
		border: 2px solid rgba(220, 18, 18, 0.22) !important;
		transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
		box-sizing: border-box !important;
	}

	/* Inner ring effect */
	.stiva-bottom-tab-center-dome::before {
		content: '' !important;
		position: absolute !important;
		inset: 3px !important;
		border-radius: 50% !important;
		background: linear-gradient(180deg, rgba(220, 18, 18, 0.06) 0%, rgba(220, 18, 18, 0.01) 100%) !important;
		border: 1px solid rgba(220, 18, 18, 0.12) !important;
		pointer-events: none !important;
	}

	.stiva-bottom-tab--center .stiva-bottom-tab-icon-wrap {
		width: 44px !important;
		height: 44px !important;
		border-radius: 50% !important;
		background: transparent !important;
		position: relative !important;
		z-index: 1 !important;
	}

	.stiva-bottom-tab--center .stiva-bottom-tab-img {
		width: 35px !important;
		height: 35px !important;
		max-width: 35px !important;
		max-height: 35px !important;
	}

	.stiva-bottom-tab--center .stiva-tab-label {
		color: #1e1e1e !important;
		font-weight: 700 !important;
		margin-top: 1px !important;
	}

	.stiva-bottom-tab--center:hover .stiva-bottom-tab-center-dome,
	.stiva-bottom-tab--center.stiva-is-active .stiva-bottom-tab-center-dome {
		border-color: #dc1212 !important;
		box-shadow: 0 -6px 18px rgba(220, 18, 18, 0.22), 0 6px 16px rgba(220, 18, 18, 0.25) !important;
		transform: translateY(-3px) scale(1.03) !important;
	}

	.stiva-bottom-tab--center:hover .stiva-tab-label,
	.stiva-bottom-tab--center.stiva-is-active .stiva-tab-label {
		color: #dc1212 !important;
	}

	.stiva-bottom-tab .stiva-tab-label {
		display: block !important;
		font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif !important;
		font-size: 13px !important;
		font-weight: 500 !important;
		line-height: 1.1 !important;
		letter-spacing: 0.45px !important;
		text-transform: uppercase !important;
		white-space: nowrap !important;
		max-width: 100% !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		margin: 0 !important;
		transition: color 0.22s ease !important;
	}

	.stiva-bottom-tab:hover,
	.stiva-bottom-tab:focus,
	.stiva-bottom-tab.stiva-is-active {
		color: #dc1212 !important;
	}

	.stiva-bottom-tab:hover::after,
	.stiva-bottom-tab.stiva-is-active::after {
		background: #dc1212 !important;
		transform: scaleX(1) !important;
	}

	.stiva-bottom-tab.stiva-is-active .stiva-bottom-tab-icon-wrap {
		background: rgba(220, 18, 18, 0.07) !important;
	}

	.stiva-bottom-tab:hover .stiva-bottom-tab-img,
	.stiva-bottom-tab.stiva-is-active .stiva-bottom-tab-img {
		transform: translateY(-1.5px) scale(1.06) !important;
	}
}
