/* VinFast Contact Menu - giao diện menu liên hệ nổi (frontend) */

/* Icon (PNG nằm trong /assets/icons) */
.menu-icon-color-fixed .menu-fixed-item .menu-icon .x3s-ico-price { background-image: url("../icons/price.png"); }
.menu-icon-color-fixed .menu-fixed-item .menu-icon .x3s-ico-sms   { background-image: url("../icons/sms.png"); }
.menu-icon-color-fixed .menu-fixed-item .menu-icon .x3s-ico-phone { background-image: url("../icons/phone.png"); }
.menu-icon-color-fixed .menu-fixed-item .menu-icon .x3s-ico-zalo  { background-image: url("../icons/zalo.png"); }
.menu-icon-color-fixed .menu-fixed-item .menu-icon .x3s-ico-drive { background-image: url("../icons/drive.png"); }

.menu-icon-color-fixed .menu-fixed-item .menu-icon i {
	background-position: center;
	background-size: 40px 40px;
	background-repeat: no-repeat;
}

.menu-icon-color-fixed {
	position: fixed;
	display: block;
	border-radius: 8px;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.menu-fixed-list .menu-name {
	color: #333;
	font-size: 9px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

.menu-fixed-list .menu-fixed-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 5px;
	text-decoration: none;
}

.menu-fixed-list .menu-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: 0.5s linear;
	margin-bottom: 5px;
}

.menu-fixed-list .menu-fixed-item:hover { background-color: #efefef; }

.menu-fixed-list .menu-icon i {
	display: block;
	width: 40px;
	height: 40px;
}

/* Desktop: cột dọc bên phải (hoặc trái) */
@media (min-width: 992px) {
	.menu-icon-color-fixed {
		right: 10px;
		bottom: 20%;
		z-index: 1000;
		box-shadow: none;
	}
	.menu-icon-color-fixed.right { right: 10px; left: unset; }
	.menu-icon-color-fixed.left  { left: 10px;  right: unset; }
	.menu-fixed-list {
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #fff;
		border: 1px solid #ddd;
		padding: 5px 0;
		border-radius: 8px;
	}
}

/* Mobile: thanh ngang cố định dưới đáy màn hình */
@media (max-width: 992px) {
	.menu-icon-color-fixed {
		left: 0;
		bottom: 0;
		right: 0;
		z-index: 1000;
		border-radius: 0;
	}
	/* Khi tắt hiển thị trên mobile */
	.menu-icon-color-fixed.x3s-hide-mobile { display: none; }

	.menu-icon-color-fixed .menu-fixed-list {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 5px 0 0;
		padding-bottom: env(safe-area-inset-bottom);
		background-color: #fff;
	}
	/* Mục được đánh dấu "nổi bật" (mặc định là Gọi điện) phình to + có chuông */
	.menu-icon-color-fixed .menu-fixed-list .menu-fixed-item.is-highlight .menu-icon {
		width: 60px;
		height: 60px;
		margin-top: -20px;
		background-color: #fff;
		padding: 5px;
	}
	.menu-icon-color-fixed .menu-fixed-list .menu-fixed-item.is-highlight .menu-icon i {
		width: 60px;
		height: 60px;
		background-size: 50px 50px;
	}
	.menu-icon-color-fixed .menu-fixed-item.is-highlight .menu-icon::after {
		transform: translate(-50%, -50%);
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
		content: "";
		display: block;
		position: absolute;
		top: 50%;
		left: 50%;
		width: 100%;
		height: 100%;
		border-radius: 50%;
		background-color: #ed1c24;
		z-index: 0;
		animation: 1s ease-in-out infinite plugin-sonar-anim;
	}
	.menu-icon-color-fixed .menu-fixed-item.is-highlight .menu-icon {
		position: relative;
		z-index: 1;
		animation: 1s ease-in-out infinite plugin-ring-anim;
	}
	.menu-icon-color-fixed .menu-fixed-item.is-highlight .menu-icon i { z-index: 2; }
}

@keyframes plugin-sonar-anim {
	0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

@keyframes plugin-ring-anim {
	0%   { transform: rotate(0); }
	10%  { transform: rotate(15deg); }
	20%  { transform: rotate(-15deg); }
	30%  { transform: rotate(15deg); }
	40%  { transform: rotate(-15deg); }
	50%  { transform: rotate(0); }
	100% { transform: rotate(0); }
}

/* ===================================================================
 * POPUP BÁO GIÁ (độc lập - giao diện y hệt .car-popup của theme,
 * nhưng namespace x3s-popup nên KHÔNG xung đột với popup khác)
 * =================================================================== */
.x3s-popup,
.x3s-popup * { box-sizing: border-box; }

.x3s-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 8px;
	background: rgba(0, 0, 0, 0.55);
}
.x3s-popup.is-active { display: flex; }

.x3s-popup__content {
	position: relative;
	width: min(875px, calc(100vw - 10px));
	max-height: calc(100vh - 16px);
	overflow-y: auto;
	background: #fff;
	border-radius: 10px;
	padding: 40px 36px 36px;
	box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
	animation: x3sPopupFadeIn 0.22s ease;
}

@keyframes x3sPopupFadeIn {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.x3s-popup__close {
	position: absolute;
	top: 15px;
	right: 16px;
	width: 28px !important;
	height: 28px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 28px !important;
	max-height: 28px !important;
	border: 0;
	background: transparent !important;
	color: #111 !important;
	cursor: pointer;
	display: block;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transform: none !important;
	-webkit-appearance: none;
	appearance: none;
}
.x3s-popup__close::before,
.x3s-popup__close::after {
	content: "";
	position: absolute;
	top: 13px;
	left: 0;
	width: 30px;
	height: 3px;
	background: #111;
	border-radius: 2px;
}
.x3s-popup__close::before { transform: rotate(45deg); }
.x3s-popup__close::after  { transform: rotate(-45deg); }
.x3s-popup__close:hover { opacity: 0.72; }

.x3s-popup__title {
	margin: 0 42px 8px 24px;
	font-size: 36px;
	line-height: 1.12;
	color: #0b0b0b;
	font-weight: 700;
	letter-spacing: 0;
	text-align: center;
}
.x3s-popup__desc {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.45;
	color: #1c1c1c;
	font-style: italic;
	text-align: center;
}

/* Cho field CF7 bên trong gọn gàng */
.x3s-popup__content .wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.x3s-popup__content .wpcf7-form textarea,
.x3s-popup__content .wpcf7-form select { width: 100%; }
.x3s-popup__content .wpcf7-form p { margin: 0 0 14px; }

body.x3s-popup-open { overflow: hidden; }

@media (max-width: 768px) {
	.x3s-popup { padding: 8px; align-items: center; }
	.x3s-popup__content {
		width: min(100%, calc(100vw - 16px));
		max-height: calc(100vh - 16px);
		padding: 34px 16px 24px;
		border-radius: 10px;
	}
	.x3s-popup__close {
		top: 12px;
		right: 12px;
		width: 25px !important;
		height: 25px !important;
		max-width: 25px !important;
		max-height: 25px !important;
	}
	.x3s-popup__close::before,
	.x3s-popup__close::after { top: 12px; width: 26px; height: 3px; }
	.x3s-popup__title { margin: 0 34px 8px 0; font-size: 20px; line-height: 1.16; }
	.x3s-popup__desc { margin-bottom: 18px; font-size: 16px; }
}
