/* Premium edge-to-edge mobile dock and add-to-cart toast
--------------------------------------------------------------- */


.jivo-mobile-dock,
.jivo-cart-toast {
	display: none;
}

@media (max-width: 767px) {
	body.jivo-cart-drawer-v1:not(.woocommerce-cart):not(.woocommerce-checkout) {
		padding-bottom: calc(58px + env(safe-area-inset-bottom));
	}

	.jivo-mobile-adding .nm-cart-panel-holder {
		visibility: hidden !important;
		pointer-events: none !important;
	}

	.jivo-mobile-dock {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1005;
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		min-height: calc(62px + env(safe-area-inset-bottom));
		padding: 5px 8px max(5px, env(safe-area-inset-bottom));
		border: 0;
		border-top: 1px solid rgba(218, 218, 225, 0.86);
		border-radius: 0;
		background: rgba(255, 255, 255, 0.94);
		box-shadow: 0 -8px 26px rgba(25, 27, 42, 0.08);
		-webkit-backdrop-filter: blur(18px) saturate(150%);
		backdrop-filter: blur(18px) saturate(150%);
		transition: opacity 180ms ease, transform 220ms ease;
	}

	.woocommerce-cart .jivo-mobile-dock,
	.woocommerce-checkout .jivo-mobile-dock,
	.cart-panel-open .jivo-mobile-dock,
	.header-search-open .jivo-mobile-dock,
	.mobile-menu-open .jivo-mobile-dock {
		pointer-events: none;
		opacity: 0;
		transform: translateY(14px);
	}

	.jivo-dock-item {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		gap: 3px;
		min-width: 0;
		border-radius: 12px;
		color: #777781;
		font-size: 9.5px;
		font-weight: 620;
		line-height: 1.1;
		-webkit-tap-highlight-color: transparent;
	}

	.jivo-dock-item.is-active {
		background: #f1f3ff;
		color: #5865f2;
	}

	.jivo-dock-icon {
		position: relative;
		display: block;
		width: 22px;
		height: 22px;
	}

	.jivo-dock-icon::before {
		display: block;
		width: 100%;
		height: 100%;
		background: currentColor;
		content: "";
		-webkit-mask-position: center;
		-webkit-mask-repeat: no-repeat;
		-webkit-mask-size: contain;
		mask-position: center;
		mask-repeat: no-repeat;
		mask-size: contain;
	}

	.jivo-dock-icon-home::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 3 9 8h-2v10h-5v-6h-4v6H5V11H3l9-8Zm0 2.7L7 10.15V19h1v-6h8v6h1v-8.85L12 5.7Z'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 3 9 8h-2v10h-5v-6h-4v6H5V11H3l9-8Zm0 2.7L7 10.15V19h1v-6h8v6h1v-8.85L12 5.7Z'/%3E%3C/svg%3E");
	}

	.jivo-dock-icon-shop::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16l1 5a3 3 0 0 1-1 2.24V21H4v-9.76A3 3 0 0 1 3 9l1-5Zm1.64 2-.6 3H5a1 1 0 0 0 2 0h2a1 1 0 0 0 2 0h2a1 1 0 0 0 2 0h2a1 1 0 0 0 2 0h-.04l-.6-3H5.64ZM6 12.83V19h12v-6.17A3 3 0 0 1 16 12a3 3 0 0 1-4 0 3 3 0 0 1-4 0 3 3 0 0 1-2 .83Z'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16l1 5a3 3 0 0 1-1 2.24V21H4v-9.76A3 3 0 0 1 3 9l1-5Zm1.64 2-.6 3H5a1 1 0 0 0 2 0h2a1 1 0 0 0 2 0h2a1 1 0 0 0 2 0h2a1 1 0 0 0 2 0h-.04l-.6-3H5.64ZM6 12.83V19h12v-6.17A3 3 0 0 1 16 12a3 3 0 0 1-4 0 3 3 0 0 1-4 0 3 3 0 0 1-2 .83Z'/%3E%3C/svg%3E");
	}

	.jivo-dock-icon-search::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 3a7.5 7.5 0 1 1-4.73 13.32L2.1 20l1.4 1.4 3.68-3.67A7.5 7.5 0 0 1 10.5 3Zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 3a7.5 7.5 0 1 1-4.73 13.32L2.1 20l1.4 1.4 3.68-3.67A7.5 7.5 0 0 1 10.5 3Zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z'/%3E%3C/svg%3E");
	}

	.jivo-dock-icon-account::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm0 9c5 0 9 2.24 9 5v2H3v-2c0-2.76 4-5 9-5Zm0 2c-4.15 0-7 1.76-7 3h14c0-1.24-2.85-3-7-3Z'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm0 9c5 0 9 2.24 9 5v2H3v-2c0-2.76 4-5 9-5Zm0 2c-4.15 0-7 1.76-7 3h14c0-1.24-2.85-3-7-3Z'/%3E%3C/svg%3E");
	}

	.jivo-dock-icon-cart::before {
		-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4h14l-1.5 10H8L6.3 6H3V4h4Zm1.72 8h9.06l.9-6H8l.72 6ZM9 16.5a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm8 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
		mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4h14l-1.5 10H8L6.3 6H3V4h4Zm1.72 8h9.06l.9-6H8l.72 6ZM9 16.5a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm8 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
	}

	.jivo-dock-cart-count {
		position: absolute;
		top: -4px;
		right: -7px;
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border: 2px solid #ffffff;
		border-radius: 999px;
		background: #5865f2;
		color: #ffffff;
		font-size: 8px;
		font-weight: 800;
		line-height: 1;
	}

	.jivo-dock-cart-count:empty {
		display: none;
	}

	.jivo-cart-toast {
		position: fixed;
		top: 50%;
		right: auto;
		bottom: auto;
		left: 50%;
		z-index: 1030;
		display: grid;
		grid-template-columns: 1fr;
		align-items: center;
		justify-items: center;
		gap: 11px;
		width: min(270px, calc(100vw - 52px));
		min-height: 232px;
		padding: 24px 22px 18px;
		overflow: hidden;
		border: 1px solid rgba(225, 227, 239, 0.95);
		border-radius: 28px;
		background: linear-gradient(155deg, rgba(255, 255, 255, 0.985), rgba(247, 248, 255, 0.98));
		box-shadow: 0 0 0 100vmax rgba(22, 24, 35, 0.12), 0 26px 70px rgba(31, 35, 58, 0.24);
		color: #17171c;
		text-align: center;
		opacity: 0;
		pointer-events: none;
		transform: translate(-50%, -43%) scale(0.84);
		-webkit-backdrop-filter: blur(20px) saturate(150%);
		backdrop-filter: blur(20px) saturate(150%);
		transition: opacity 220ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
	}

	.jivo-cart-toast.is-visible {
		opacity: 1;
		pointer-events: auto;
		transform: translate(-50%, -50%) scale(1);
	}

	.jivo-cart-toast-icon {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 68px;
		height: 68px;
		border-radius: 50%;
		background: linear-gradient(145deg, #7d86ff, #5865f2);
		box-shadow: 0 0 0 9px rgba(88, 101, 242, 0.09), 0 13px 28px rgba(88, 101, 242, 0.25);
	}

	.jivo-cart-toast-icon::before {
		content: "\2713";
		color: #ffffff;
		font-size: 29px;
		font-weight: 800;
	}

	.jivo-cart-toast-icon::after {
		position: absolute;
		width: 96px;
		height: 96px;
		border: 1px solid rgba(88, 101, 242, 0.18);
		border-radius: 50%;
		content: "";
	}

	.jivo-cart-toast.is-visible .jivo-cart-toast-icon {
		animation: jivo-toast-icon 560ms cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
	}

	.jivo-cart-toast-copy {
		display: flex;
		min-width: 0;
		flex-direction: column;
		gap: 5px;
		align-items: center;
	}

	.jivo-cart-toast-copy strong {
		color: #17171c;
		font-size: 19px;
		font-weight: 720;
		line-height: 1.2;
	}

	.jivo-cart-toast-copy small {
		overflow: hidden;
		color: #74747d;
		font-size: 12px;
		line-height: 1.25;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.jivo-cart-toast-open {
		min-width: 126px;
		height: 40px;
		padding: 0 16px;
		border: 0;
		border-radius: 12px;
		background: #5865f2;
		color: #ffffff;
		font-size: 12px;
		font-weight: 680;
	}

	.jivo-cart-toast-progress {
		position: absolute;
		right: 0;
		bottom: 0;
		left: 0;
		height: 2px;
		background: linear-gradient(90deg, #5865f2, #8a92ff);
		transform: scaleX(0);
		transform-origin: left;
	}

	.jivo-cart-toast.is-visible .jivo-cart-toast-progress {
		animation: jivo-toast-progress 3.4s linear forwards;
	}
}

@keyframes jivo-toast-progress {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

@keyframes jivo-toast-icon {
	0% { opacity: 0; transform: scale(0.45) rotate(-12deg); }
	70% { opacity: 1; transform: scale(1.08) rotate(3deg); }
	100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* v2 dock refinement: edge-to-edge body with a focused active capsule. */
@media (max-width: 767px) {
	.jivo-mobile-dock {
		box-sizing: border-box;
		height: calc(58px + env(safe-area-inset-bottom));
		min-height: 0;
		padding: 4px 10px max(4px, env(safe-area-inset-bottom));
		border-top: 1px solid rgba(225, 227, 237, 0.72);
		background: rgba(255, 255, 255, 0.9);
		box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.9), 0 -14px 34px rgba(28, 31, 50, 0.075);
		-webkit-backdrop-filter: blur(22px) saturate(175%);
		backdrop-filter: blur(22px) saturate(175%);
	}

	.jivo-mobile-dock::before {
		position: absolute;
		top: -1px;
		left: 50%;
		width: min(128px, 30vw);
		height: 1px;
		background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.35), transparent);
		content: "";
		transform: translateX(-50%);
	}

	.jivo-dock-item {
		gap: 1px;
		border-radius: 0;
		background: transparent !important;
		color: #7c7f8b;
		font-size: 9px;
		font-weight: 640;
		transition: color 160ms ease, transform 160ms ease;
	}

	.jivo-dock-icon-shell {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 26px;
		border: 1px solid transparent;
		border-radius: 999px;
		transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
	}

	.jivo-dock-item.is-active {
		color: #5865f2;
	}

	.jivo-dock-item.is-active .jivo-dock-icon-shell {
		border-color: rgba(88, 101, 242, 0.1);
		background: linear-gradient(145deg, #f2f4ff, #e9ecff);
		box-shadow: 0 5px 15px rgba(88, 101, 242, 0.14), inset 0 1px 0 #ffffff;
		transform: translateY(-1px);
	}

	.jivo-dock-item:active .jivo-dock-icon-shell {
		transform: scale(0.9);
	}

	.jivo-dock-icon {
		width: 19px;
		height: 19px;
	}

	.jivo-dock-cart-count {
		top: -5px;
		right: -8px;
		min-width: 17px;
		height: 17px;
		box-shadow: 0 3px 9px rgba(88, 101, 242, 0.25);
	}
}
/* Jivo Dock v2.4 — crisp outline icons and compact enterprise typography */
@media (max-width: 767px) {
	.jivo-mobile-dock {
		height: calc(56px + env(safe-area-inset-bottom));
		padding: 3px 10px max(3px, env(safe-area-inset-bottom));
	}

	.jivo-dock-item {
		gap: 1px;
		color: #737681;
		font-size: 9px;
		font-weight: 670;
		letter-spacing: -.015em;
	}

	.jivo-dock-icon-shell {
		width: 38px;
		height: 27px;
	}

	.jivo-dock-icon {
		width: 20px;
		height: 20px;
	}

	.jivo-dock-icon::before {
		display: none;
	}

	.jivo-dock-icon svg {
		display: block;
		width: 100%;
		height: 100%;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.75;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.jivo-dock-item.is-active {
		color: #5360ee;
		font-weight: 730;
	}

	.jivo-dock-item.is-active .jivo-dock-icon-shell {
		border-color: rgba(88, 101, 242, .12);
		background: linear-gradient(145deg, #f5f6ff, #e9ecff);
		box-shadow: 0 4px 13px rgba(88, 101, 242, .13), inset 0 1px 0 #fff;
	}

	.jivo-dock-cart-count {
		top: -5px;
		right: -8px;
		font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
		font-size: 8px;
	}
}

