/*
 * Pitta mobile toolbar: the fixed bar at the bottom of phone screens, three options (Μενού | Παραγγελία | Καλάθι).
 * Markup: inc/pitta-toolbar.php. The parent theme's .jws-toolbar-wap supplies position: fixed and the "phones only"
 * rule (it slides out of view above 1024px); everything else is restated here because the parent sizes it for tiny
 * 45px text-only items.
 */

.jws-toolbar-wap.pitta-toolbar {
	align-items: stretch;
	justify-content: space-around;
	gap: 0;
	height: auto;
	padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
	overflow: visible;
	border-top: 1px solid var(--pitta-line, #E7E2DA);
	background: #FFFFFF;
	box-shadow: 0 -4px 16px rgba(37, 47, 54, 0.08);
	font-family: inherit;
}

.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item {
	flex: 1 1 0;
	min-width: 0;
	font-size: 11px;
	text-align: center;
}

.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	min-height: 54px;
	padding: 3px 2px;
	border-radius: 14px;
	color: var(--pitta-ink, #252F36);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item svg {
	display: block;
	flex: none;
	box-sizing: content-box;
	width: 22px;
	height: 22px;
	padding: 5px;
	border-radius: 50%;
}

.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item span {
	display: block;
	max-width: 100%;
	overflow: hidden;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* the page you are on */
.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item.is-active a {
	background: var(--pitta-yellow-tint, #FFF6D6);
	color: var(--pitta-red, #B90000);
}

/* Παραγγελία is the main action: its icon sits in a red circle at all times (every icon has the same 32px box, so the
   three labels line up) */
.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item--order svg {
	background: var(--pitta-red, #B90000);
	color: #FFFFFF;
}

.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item--order.is-active a {
	color: var(--pitta-red, #B90000);
}

.jws-toolbar-wap.pitta-toolbar .pitta-toolbar__item a:focus-visible {
	outline: 2px solid var(--pitta-red, #B90000);
	outline-offset: 2px;
}

@media (max-width: 1024px) {

	/* room under the page for the taller bar (the parent reserves 55px for its 45px one) */
	body.has_toolbar {
		padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
	}

	/* floating buttons above the bar instead of over its last item: the chat bubble (AI Engine) keeps the right corner,
	   the back-to-top arrow moves to the left corner */
	.backToTop {
		right: auto;
		left: 16px;
		bottom: calc(80px + env(safe-area-inset-bottom, 0px));
	}

	/* Popups (the quick-view modal with its quantity + Add to cart bar, etc.) open over the toolbar. The parent puts the
	   bar at z-index 350 but Magnific Popup's overlay and wrapper at 102 / 103, so the bar covered the bottom of the
	   modal. */
	body.has_toolbar .mfp-bg {
		z-index: 360;
	}

	body.has_toolbar .mfp-wrap {
		z-index: 361;
	}

	body.has_toolbar .mwai-chat.mwai-window.mwai-bottom-right,
	body.has_toolbar .mwai-chat.mwai-window.mwai-bottom-right .mwai-trigger {
		bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
	}
}
