/* Mobile bottom nav bar (Step 30). Values match the wp-bottom-menu plugin's live output exactly. */

.wp-bottom-menu {
	display: none;
	background: #ffffff;
	width: 100%;
	position: fixed;
	bottom: 0;
	left: 0;
	justify-content: space-around;
	padding: 10px 0;
	box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
	z-index: 9999;
	transition: all 200ms;
}

.wp-bottom-menu-item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: auto;
	flex: 1;
	font-size: 10px;
	text-decoration: none !important;
	color: #555555;
	cursor: pointer;
	user-select: none;
	transition: color 200ms;
}

.wp-bottom-menu-item:hover,
.wp-bottom-menu-item.active,
.wp-bottom-menu.sf-active .wp-bottom-menu-item.wp-bottom-menu-search-form-trigger {
	color: #000000;
}

.wp-bottom-menu-item span {
	margin-top: 5px;
	color: inherit;
}

.wp-bottom-menu-item i {
	font-size: 18px;
	color: #555555;
	transition: color 200ms;
}

.wp-bottom-menu-item:hover i,
.wp-bottom-menu-item.active i,
.wp-bottom-menu.sf-active .wp-bottom-menu-item.wp-bottom-menu-search-form-trigger i {
	color: #000000;
}

.wp-bottom-menu-icon-wrapper {
	position: relative;
	line-height: 0;
}

.wp-bottom-menu-cart-count {
	position: absolute;
	box-sizing: content-box;
	top: -5px;
	left: 50%;
	width: 13.5px;
	height: 13.5px;
	font-size: 9px;
	line-height: 13.5px;
	border: 2px solid #ffffff;
	border-radius: 100%;
	text-align: center;
	background: #ff0000;
	color: #ffffff;
	font-weight: bold;
}

.wp-bottom-menu-search-form-wrapper {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background: #ffffff;
	padding: 10px;
	transition: all 200ms;
	transform: translateY(100%);
	box-sizing: border-box;
}

.wp-bottom-menu-search-form-wrapper form {
	position: relative;
}

.wp-bottom-menu-search-form input[type="search"] {
	border: 1px solid #eee;
	border-radius: 8px;
	width: 100%;
	font-size: 16px;
	height: 40px;
	padding-left: 50px;
	padding-right: 30px;
}

.wp-bottom-menu-search-form input[type="search"]::-webkit-search-decoration,
.wp-bottom-menu-search-form input[type="search"]::-webkit-search-cancel-button,
.wp-bottom-menu-search-form input[type="search"]::-webkit-search-results-button,
.wp-bottom-menu-search-form input[type="search"]::-webkit-search-results-decoration {
	display: none;
}

.wp-bottom-menu-search-form i {
	position: absolute;
	top: 50%;
	left: 30px;
	transform: translate(-50%, -50%);
}

.wp-bottom-menu-search-form-wrapper.sf-active {
	z-index: 9998;
	box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
	transform: translateY(0);
}

.wp-bottom-menu.sf-active {
	box-shadow: none;
}

@media (max-width: 1024px) {
	.wp-bottom-menu {
		display: flex;
	}
	.wp-bottom-menu-search-form-wrapper {
		display: block;
	}
}

/**
 * Step 109: slimmer bar. The plugin's original sizing (10px padding, 18px icons, 5px label gap)
 * made the bar ~60px tall, which eats a lot of a phone screen. Same five items, same tap area
 * width, just tighter vertically -- about 42px now. js/bottom-menu.js sets the body's bottom
 * padding from the bar's own height, so that follows along on its own.
 */
.wp-bottom-menu {
	padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}
.wp-bottom-menu-item {
	font-size: 9.5px;
	line-height: 1.2;
}
.wp-bottom-menu-item i {
	font-size: 16px;
}
.wp-bottom-menu-item span {
	margin-top: 3px;
}
.wp-bottom-menu-cart-count {
	top: -6px;
	width: 12px;
	height: 12px;
	line-height: 12px;
	font-size: 8.5px;
	border-width: 1.5px;
}
.wp-bottom-menu-search-form-wrapper {
	padding: 8px;
}

/**
 * Step 109: the Tawk.to chat bubble sits bottom-right with no offset of its own, so it covered
 * the bar's "Search" button. Tawk_API.customStyle (inc/head-code.php) lifts it on phones; this
 * covers the tablet widths Tawk still counts as "desktop" while the bar is on screen, and acts
 * as a fallback if Tawk ignores the API.
 */
@media only screen and (max-width: 1024px) {
	iframe[title="chat widget"] {
		bottom: 54px !important;
	}
}
/**
 * Step 113: tap feedback for the bottom nav (see js/bottom-menu.js).
 * A 3px bar at the very top of the screen that starts the moment an item is tapped and creeps
 * forward while the next page loads, the tapped item turning blue straight away, and a small
 * press-down on every item so a tap registers under the finger even before anything loads.
 */
.priads-nav-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100003;
	width: 0;
	height: 3px;
	background: #0095FF;
	box-shadow: 0 0 8px rgba(0, 149, 255, .6);
	border-radius: 0 2px 2px 0;
	transition: width 9s cubic-bezier(0, .7, .3, 1);
	pointer-events: none;
}
.priads-nav-progress.is-running {
	width: 93%;
}
.wp-bottom-menu-item {
	transition: color 200ms, transform 120ms ease;
	-webkit-tap-highlight-color: transparent;
}
.wp-bottom-menu-item:active {
	transform: scale(.9);
}
.wp-bottom-menu-item.is-loading .wp-bottom-menu-icon-wrapper {
	animation: priads-nav-pulse 900ms ease-in-out infinite;
}
@keyframes priads-nav-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .4; }
}
@media (prefers-reduced-motion: reduce) {
	.wp-bottom-menu-item:active { transform: none; }
	.wp-bottom-menu-item.is-loading .wp-bottom-menu-icon-wrapper { animation: none; opacity: .5; }
}