/* Nut "Lien he" noi o goc phai duoi — xem inc/contact-widget.php */

.bioseed-contact {
	position: fixed;
	right: 24px;
	bottom: 24px;
	/* Cao hon header dinh (Flatsome dung 30) nhung THAP hon popup mua nhanh va
	   toast (100000/100001) de khong che mat form dat hang. */
	z-index: 999;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

/* ----- Cot icon ----- */

.bioseed-contact-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	/*
	 * Khi dong: khong nhin thay VA khong bam duoc. Thieu pointer-events:none
	 * thi ba cai link trong suot van nam de tren nut, khach bam vao khoang
	 * trong phia tren nut "Lien he" se bi goi dien thoai — loi khong the thay
	 * bang mat, chi lo ra khi co nguoi bam nham.
	 */
	pointer-events: none;
}
.bioseed-contact.is-open .bioseed-contact-list {
	pointer-events: auto;
}
/*
 * [hidden] chi dung cho trang thai truoc khi JS chay: khong co JS thi cot icon
 * nam im, khong lo ra mot cum icon khong bao gio dong lai duoc. Ngay khi JS gan
 * xong su kien no se go [hidden] va chuyen sang dieu khien bang class .is-open,
 * vi phan tu [hidden] khong the chay transition duoc.
 */
.bioseed-contact-list[hidden] {
	display: none;
}

.bioseed-contact-item {
	margin: 0;
	/* Diem xuat phat: chim xuong duoi, nho lai va trong suot. */
	opacity: 0;
	transform: translateY(16px) scale(.72);
	/*
	 * Duong cong vot nhe (cubic-bezier co diem cuoi > 1) cho icon nay len roi
	 * lang lai — muot hon kieu ease thuan. Khong dung duong cong vot manh
	 * (.68,-.55,.265,1.55) nhu ban truoc: voi quang duong ngan 16px no giat
	 * chu khong muot.
	 */
	transition:
		opacity .32s cubic-bezier(.22, .61, .36, 1),
		transform .42s cubic-bezier(.21, 1.02, .32, 1.18);
	transition-delay: var(--bioseed-close-delay, 0ms);
}
.bioseed-contact.is-open .bioseed-contact-item {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: var(--bioseed-open-delay, 0ms);
}

.bioseed-contact-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--bioseed-contact-bg, #6c757d);
	color: #fff !important;
	font-size: 19px;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
	transition: transform .2s cubic-bezier(.22, .61, .36, 1), box-shadow .2s ease;
}
.bioseed-contact-link:hover,
.bioseed-contact-link:focus-visible {
	transform: scale(1.1);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
	color: #fff !important;
}

/* Icon la anh: phu kin hinh tron. */
.bioseed-contact-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* Icon dang chu (Zalo) ve bang SVG. */
.bioseed-contact-svg {
	width: 30px;
	height: 30px;
}
/* Anh chi la net ve tren nen trong (vi du ic_phone) thi thu lai, chua vien
   trang o duoi — de nguyen kin vong tron se sat re. */
.bioseed-contact-link--phone .bioseed-contact-img {
	width: 62%;
	height: 62%;
	margin: auto;
	object-fit: contain;
}

/* ----- Nut bam ----- */

.bioseed-contact-toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	/*
	 * Chieu rong phai la mot con so cu the o CA HAI trang thai thi trinh duyet
	 * moi chay transition duoc — width:auto khong noi suy duoc, nut se giat
	 * mot phat tu dai sang tron. 104px la be ngang do duoc cua chu "Liên hệ"
	 * o co 14px/600 cong dem hai ben; doi chu tren nut thi nho do lai so nay.
	 */
	width: 104px;
	min-width: 0;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #f0a020;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	/* Flatsome viet hoa moi <button>; mau thiet ke dung chu thuong "Lien he". */
	text-transform: none;
	text-shadow: none;
	white-space: nowrap;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	cursor: pointer;
	transition:
		width .34s cubic-bezier(.22, .61, .36, 1),
		background .2s ease,
		transform .2s ease;
}
.bioseed-contact-toggle:hover {
	background: #d98c14;
	transform: translateY(-2px);
}

/* Khi mo, nut co lai thanh hinh tron dau "×". */
.bioseed-contact.is-open .bioseed-contact-toggle {
	width: 44px;
}

/*
 * Hai nhan chong len nhau va mo dan qua lai, thay vi hien/an dot ngot bang
 * display. Xep chong bang position:absolute nen ca hai deu nam giua nut.
 */
.bioseed-contact-toggle-text,
.bioseed-contact-toggle-close {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(1);
	transition: opacity .22s ease, transform .28s cubic-bezier(.22, .61, .36, 1);
}
.bioseed-contact-toggle-close {
	opacity: 0;
	transform: translate(-50%, -50%) scale(.5) rotate(-90deg);
	font-size: 26px;
}
.bioseed-contact.is-open .bioseed-contact-toggle-text {
	opacity: 0;
	transform: translate(-50%, -50%) scale(.6);
}
.bioseed-contact.is-open .bioseed-contact-toggle-close {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

@media (max-width: 549px) {
	.bioseed-contact {
		right: 14px;
		bottom: 14px;
	}
	.bioseed-contact-link {
		width: 42px;
		height: 42px;
		font-size: 17px;
	}
	.bioseed-contact-toggle {
		width: 96px;
		height: 40px;
		font-size: 13px;
	}
	.bioseed-contact.is-open .bioseed-contact-toggle {
		width: 40px;
	}
}

/* Ton trong cai dat "giam chuyen dong" cua he dieu hanh. */
@media (prefers-reduced-motion: reduce) {
	.bioseed-contact-item,
	.bioseed-contact-link,
	.bioseed-contact-toggle,
	.bioseed-contact-toggle-text,
	.bioseed-contact-toggle-close {
		transition: none;
	}
	.bioseed-contact-item {
		transition-delay: 0s;
	}
}
