/**
 * Flatsome Lite - Header Contact Buttons & Consult/Quote Popup Modal
 * Tương thích chuẩn E-Commerce (Điện Máy Xanh & lopxenang.vn)
 * Thiết kế Flat Design hiện đại, hiệu năng cao, chống giật lag.
 */

/* ==========================================================================
   1. HEADER CALL BUTTONS (HOTLINE 1, 2, 3)
   ========================================================================== */

li.header-call-button-item {
	display: inline-flex;
	align-items: center;
	align-self: center;
	list-style: none;
	margin: 0;
	padding: 0 4px;
}

.header-call-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	text-decoration: none !important;
	color: inherit;
	padding: 4px 8px;
	border-radius: 8px;
	transition: all 0.2s ease;
	user-select: none;
}

.header-call-btn:hover {
	background: rgba(255, 255, 255, 0.12);
}

.header-color-dark .header-call-btn:hover {
	background: rgba(0, 0, 0, 0.05);
}

.header-call-btn .call-btn-icon {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	color: inherit;
	flex-shrink: 0;
	transition: transform 0.2s ease, background 0.2s ease;
}

.header-color-dark .header-call-btn .call-btn-icon {
	background: rgba(2, 132, 199, 0.12);
	color: #0284c7;
}

.header-call-btn:hover .call-btn-icon {
	transform: scale(1.08);
	background: rgba(255, 255, 255, 0.3);
}

.header-color-dark .header-call-btn:hover .call-btn-icon {
	background: rgba(2, 132, 199, 0.2);
}

.header-call-btn .call-btn-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	line-height: 1.18;
	text-align: left;
}

.header-call-btn .call-btn-label {
	font-size: 11px;
	opacity: 0.88;
	font-weight: 500;
	white-space: nowrap;
	text-transform: capitalize;
}

.header-call-btn .call-btn-phone {
	font-size: 14.5px;
	font-weight: 700;
	white-space: nowrap;
	letter-spacing: -0.2px;
	color: inherit;
}

/* ==========================================================================
   2. HEADER CONSULT BUTTON ("YÊU CẦU TƯ VẤN" / "CHỌN KHU VỰC")
   ========================================================================== */

li.header-consult-button-item {
	display: inline-flex;
	align-items: center;
	align-self: center;
	list-style: none;
	margin: 0;
	padding: 0 4px;
}

.header-consult-btn {
	height: 38px;
	padding: 0 16px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-weight: 700;
	font-size: 13.5px;
	cursor: pointer;
	text-decoration: none !important;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	line-height: 1;
	user-select: none;
	white-space: nowrap;
}

/* Style: Pill Outline */
.header-consult-button-item.style-pill-outline .header-consult-btn {
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, 0.75);
	color: inherit;
}
.header-color-dark .header-consult-button-item.style-pill-outline .header-consult-btn {
	border-color: #cbd5e1;
	color: #1e293b;
}

.header-consult-button-item.style-pill-outline .header-consult-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.header-color-dark .header-consult-button-item.style-pill-outline .header-consult-btn:hover {
	background: #f1f5f9;
	border-color: #0284c7;
	color: #0284c7;
}

/* Style: Pill Solid */
.header-consult-button-item.style-pill-solid .header-consult-btn {
	background: #ffffff;
	border: 1.5px solid transparent;
	color: #0284c7 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.header-consult-button-item.style-pill-solid .header-consult-btn:hover {
	background: #f8fafc;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	transform: translateY(-1px);
}

/* Style: Flat */
.header-consult-button-item.style-flat .header-consult-btn {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: inherit;
}
.header-consult-button-item.style-flat .header-consult-btn:hover {
	background: rgba(255, 255, 255, 0.28);
}

.header-consult-btn .consult-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.header-consult-btn .consult-btn-arrow {
	display: inline-flex;
	align-items: center;
	transition: transform 0.2s ease;
}

.header-consult-btn:hover .consult-btn-arrow {
	transform: translateX(3px);
}

/* ==========================================================================
   3. CONSULT & QUOTE POPUP MODAL (CHUẨN LOPXENANG.VN)
   ========================================================================== */

.lxn-quote-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	overflow-y: auto;
	animation: lxnOverlayFadeIn 0.2s ease-out;
}

@keyframes lxnOverlayFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.lxn-quote-modal {
	position: relative;
	width: 100%;
	max-width: 580px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28), 0 0 1px 1px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	animation: lxnModalSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
	margin: auto;
}

@keyframes lxnModalSlideDown {
	from {
		opacity: 0;
		transform: translateY(-18px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Modal Header */
.lxn-quote-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px 16px;
	background: #f8fafc;
	border-bottom: 1px solid #eef2f6;
}

.lxn-quote-modal-header-title {
	display: flex;
	align-items: center;
	gap: 14px;
}

.lxn-quote-modal-header-badge {
	width: 44px;
	height: 44px;
	border-radius: 11px;
	background: #e0f2fe;
	color: #0284c7;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.lxn-quote-modal-header-title h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
	letter-spacing: -0.2px;
}

.lxn-quote-modal-header-title p {
	margin: 3px 0 0 0;
	font-size: 13px;
	color: #64748b;
	line-height: 1.3;
}

.lxn-quote-close-btn {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.15s ease;
	flex-shrink: 0;
}

.lxn-quote-close-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}

/* Modal Body */
.lxn-quote-body {
	padding: 20px 24px;
	max-height: calc(85vh - 160px);
	overflow-y: auto;
	box-sizing: border-box;
}

/* Toggle Cá nhân / Doanh nghiệp */
.lxn-quote-type-toggle {
	display: flex;
	gap: 12px;
	margin-bottom: 18px;
	background: #f1f5f9;
	padding: 4px;
	border-radius: 10px;
}

.lxn-radio-label {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 7px;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 600;
	color: #64748b;
	transition: all 0.15s ease;
	margin: 0 !important;
	user-select: none;
}

.lxn-radio-label input[type="radio"] {
	display: none;
}

.lxn-radio-label:has(input:checked),
.lxn-radio-label.is-checked {
	background: #ffffff;
	color: #0284c7;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.lxn-radio-label .radio-custom {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #cbd5e1;
	position: relative;
	transition: all 0.15s ease;
}

.lxn-radio-label:has(input:checked) .radio-custom,
.lxn-radio-label.is-checked .radio-custom {
	border-color: #0284c7;
}

.lxn-radio-label:has(input:checked) .radio-custom::after,
.lxn-radio-label.is-checked .radio-custom::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #0284c7;
}

/* Form Groups & Grid */
.lxn-quote-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 520px) {
	.lxn-quote-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

.lxn-form-group {
	margin-bottom: 14px;
}

.lxn-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
	line-height: 1.25;
}

.lxn-form-group label .required {
	color: #ef4444;
	font-weight: 700;
}

.lxn-hint-text {
	font-size: 11.5px;
	font-weight: normal;
	color: #0284c7;
}

.lxn-form-group input[type="text"],
.lxn-form-group input[type="tel"],
.lxn-form-group input[type="email"],
.lxn-form-group textarea {
	width: 100% !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	padding: 10px 14px !important;
	font-size: 13.5px !important;
	color: #0f172a !important;
	background: #ffffff !important;
	transition: border-color 0.15s, box-shadow 0.15s !important;
	box-sizing: border-box !important;
	margin: 0 !important;
}

.lxn-form-group textarea {
	resize: vertical;
	min-height: 70px;
}

.lxn-form-group input:focus,
.lxn-form-group textarea:focus {
	border-color: #0284c7 !important;
	box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
	outline: none !important;
}

.error-msg {
	display: block;
	font-size: 12px;
	color: #ef4444;
	margin-top: 4px;
	font-weight: 500;
}

/* Tax Input with Loader */
.lxn-input-with-loader {
	position: relative;
}

.lxn-tax-spinner {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #0284c7;
	display: flex;
	align-items: center;
}

.lxn-tax-spinner svg.spinner {
	animation: lxnSpin 0.8s linear infinite;
}

@keyframes lxnSpin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.lxn-tax-status {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-top: 4px;
	color: #16a34a;
}

.lxn-form-alert {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	margin-top: 10px;
	background: #fee2e2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

/* Modal Footer */
.lxn-quote-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 24px;
	background: #f8fafc;
	border-top: 1px solid #eef2f6;
}

.lxn-quote-security {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #64748b;
	font-weight: 500;
}

.lxn-quote-security svg {
	color: #10b981;
	flex-shrink: 0;
}

.lxn-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 24px;
	border-radius: 8px;
	background: #0284c7;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 700;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	white-space: nowrap;
}

.lxn-submit-btn:hover {
	background: #0369a1;
	box-shadow: 0 6px 16px rgba(2, 132, 199, 0.36);
	transform: translateY(-1px);
}

.lxn-submit-btn svg.spinner {
	animation: lxnSpin 0.8s linear infinite;
}

/* Success State Screen */
.lxn-quote-success-state {
	padding: 40px 30px;
	text-align: center;
}

.lxn-quote-success-state .success-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #dcfce7;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.lxn-quote-success-state h3 {
	font-size: 20px;
	font-weight: 700;
	color: #15803d;
	margin: 0 0 8px;
}

.lxn-quote-success-state p {
	font-size: 14.5px;
	color: #475569;
	line-height: 1.5;
	max-width: 440px;
	margin: 0 auto 24px;
}

.lxn-quote-success-state .success-actions {
	display: flex;
	justify-content: center;
}
