/* =========================================================================
   Floating Contact Button
   All sizing uses em; breakpoint at 48em (768px).
   ========================================================================= */

.aroma-float-btn {
	position: fixed;
	bottom: 1em;
	right: 1em;
	z-index: 99;
}

@media (min-width: 48em) {
	.aroma-float-btn {
		bottom: 2em;
		right: 2em;
	}
}

/* Outer column flex */
.aroma-float-btn__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75em;
}

/* -------------------------------------------------------------------------
   Sub-actions list (hidden by default, revealed when open)
   ------------------------------------------------------------------------- */
.aroma-float-btn__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	transition: opacity 0.3s, transform 0.3s;
	transform-origin: bottom center;
	opacity: 0;
	transform: translateY(2em) scale(0.9);
	pointer-events: none;
}

.aroma-float-btn--open .aroma-float-btn__actions {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Auto-expand on hover for pointer devices (not touch). */
@media ( hover: hover ) {
	.aroma-float-btn:hover .aroma-float-btn__actions {
		opacity: 1;
		transform: translateY(0) scale(1);
		pointer-events: auto;
	}

	.aroma-float-btn:hover .aroma-float-btn__icon--msg {
		transform: rotate(90deg) scale(0);
	}

	.aroma-float-btn:hover .aroma-float-btn__icon--close {
		transform: rotate(0deg) scale(1);
	}
}

/* -------------------------------------------------------------------------
   Individual action item + tooltip
   ------------------------------------------------------------------------- */
.aroma-float-btn__item {
	position: relative;
	display: flex;
	justify-content: flex-end;
}

.aroma-float-btn__tooltip {
	display: none; /* mobile: hidden */
	position: absolute;
	right: 120%;
	top: 50%;
	transform: translateY(-50%) translateX(0.5em);
	padding: 0.375em 0.75em;
	background: #fff;
	color: #1f2937;
	font-size: 0.875em;
	font-weight: 700;
	border-radius: 0.5em;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
	border: 1px solid #f3f4f6;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
	white-space: nowrap;
	pointer-events: none;
}

@media (min-width: 48em) {
	.aroma-float-btn__tooltip {
		display: block;
	}
}

.aroma-float-btn__item:hover .aroma-float-btn__tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}

/* Tooltip arrow (right-pointing caret) */
.aroma-float-btn__tooltip-arrow {
	position: absolute;
	top: 50%;
	right: -0.375em;
	transform: translateY(-50%) rotate(45deg);
	width: 0.75em;
	height: 0.75em;
	background: #fff;
	border-right: 1px solid #f3f4f6;
	border-top: 1px solid #f3f4f6;
}

/* -------------------------------------------------------------------------
   Action links (Zalo, Messenger, Contact)
   Use body prefix for specificity (0,2,1) > Elementor kit (0,1,1).
   ------------------------------------------------------------------------- */
body .aroma-float-btn .aroma-float-btn__link {
	width: 3em;
	height: 3em;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	transition: transform 0.2s;
	flex-shrink: 0;
	font-weight: 400;
}

body .aroma-float-btn .aroma-float-btn__link:hover {
	transform: scale(1.1);
	color: #fff;
	text-decoration: none;
}

body .aroma-float-btn .aroma-float-btn__link--zalo {
	background-color: #0068ff;
	box-shadow: 0 4px 15px rgba(0, 104, 255, 0.4);
}

body .aroma-float-btn .aroma-float-btn__link--zalo .aroma-float-btn__zalo-text {
	font-weight: 700;
	font-size: 0.875em;
	letter-spacing: -0.05em;
}

body .aroma-float-btn .aroma-float-btn__link--messenger {
	background: linear-gradient(to top right, #0084ff, #00c6ff);
	box-shadow: 0 4px 15px rgba(0, 132, 255, 0.4);
}

body .aroma-float-btn .aroma-float-btn__link--contact {
	background-color: #2ba86f;
	box-shadow: 0 4px 15px rgba(43, 168, 111, 0.4);
}

/* -------------------------------------------------------------------------
   Main toggle button
   Use body prefix for specificity (0,2,1) > Elementor kit (0,1,1).
   ------------------------------------------------------------------------- */
body .aroma-float-btn .aroma-float-btn__toggle {
	position: relative;
	z-index: 10;
	width: 3.5em;
	height: 3.5em;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #1660aa;
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(22, 96, 170, 0.4);
	transition: background-color 0.3s, transform 0.3s;
	flex-shrink: 0;
	font-weight: 400;
}

@media (min-width: 48em) {
	body .aroma-float-btn .aroma-float-btn__toggle {
		width: 4em;
		height: 4em;
	}
}

body .aroma-float-btn .aroma-float-btn__toggle:hover {
	background-color: #104375;
	transform: scale(1.05);
}

/* Pulse ring */
.aroma-float-btn__ping {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-color: #1660aa;
	opacity: 0.3;
	animation: aroma-float-ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes aroma-float-ping {
	75%, 100% {
		transform: scale(2);
		opacity: 0;
	}
}

/* Toggle icons — message-circle and X */
.aroma-float-btn__icon {
	position: absolute;
	transition: transform 0.3s;
	line-height: 0.55em;
}

.aroma-float-btn__icon--msg {
	transform: rotate(0deg) scale(1);
}

.aroma-float-btn__icon--close {
	transform: rotate(-90deg) scale(0);
}

.aroma-float-btn--open .aroma-float-btn__icon--msg {
	transform: rotate(90deg) scale(0);
}

.aroma-float-btn--open .aroma-float-btn__icon--close {
	transform: rotate(0deg) scale(1);
}
