/* Goftino — hide default bubble; position chat near Afarin contact buttons */

#box-widget-icon,
#box-widget-icon * {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

#goftino_win {
	z-index: 1060 !important;
}

@media (min-width: 768px) {
	#goftino_win {
		right: 1.5rem !important;
		left: auto !important;
		bottom: 6.5rem !important;
	}
}

@media (max-width: 767px) {
	#goftino_win {
		right: auto !important;
		left: 50% !important;
		bottom: calc(var(--af-mobile-dock-h, 108px) + 10px) !important;
		transform: translateX(-50%) !important;
		max-width: min(100vw - 2rem, 360px) !important;
		width: min(100vw - 2rem, 360px) !important;
	}
}

.af-goftino-counter {
	position: absolute;
	top: -0.2rem;
	inset-inline-end: -0.15rem;
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--af-accent, #b83d52);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1.125rem;
	text-align: center;
	z-index: 4;
	pointer-events: none;
}

.af-goftino-counter:empty {
	display: none;
}

.af-goftino-preview {
	position: fixed;
	z-index: 1065;
	max-width: min(280px, calc(100vw - 2rem));
	margin: 0;
	padding: 0.8rem 1rem;
	border: none;
	border-radius: 1rem;
	background: #fff;
	color: var(--af-text, #1e293b);
	font: inherit;
	font-size: 0.875rem;
	line-height: 1.55;
	text-align: start;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
	cursor: pointer;
}

@media (max-width: 767px) {
	.af-goftino-preview {
		left: 50%;
		right: auto;
		bottom: calc(var(--af-mobile-dock-h, 108px) + 14px);
		transform: translateX(-50%);
		animation: af-goftino-preview-in-mobile 0.28s ease;
	}

	.af-goftino-preview::after {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
	}
}

@media (min-width: 768px) {
	.af-goftino-preview {
		right: 1.75rem;
		left: auto;
		bottom: 6.5rem;
		transform: none;
		animation: af-goftino-preview-in 0.28s ease;
	}

	.af-goftino-preview::after {
		left: auto;
		right: 1.35rem;
		transform: none;
	}
}

.af-goftino-preview[hidden] {
	display: none !important;
}

.af-goftino-preview__text {
	display: block;
}

.af-goftino-preview::after {
	content: "";
	position: absolute;
	bottom: -6px;
	border: 6px solid transparent;
	border-top-color: #fff;
}

@keyframes af-goftino-preview-in-mobile {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

@keyframes af-goftino-preview-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}
