/* Webvina PCCC Tools - frontend. Màu chính lấy theo theme (--primary-color của Flatsome), có giá trị dự phòng. */
:root {
	--wvpt-primary: var(--primary-color, #ff3333);
	--wvpt-dark: #1f2933;
	--wvpt-border: #e5e5e5;
	--wvpt-radius: 6px;
}

/* Lưới form dùng chung */
.wvpt-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 20px;
}

.wvpt-field {
	margin-bottom: 14px;
}

.wvpt-field label,
.wvpt-field legend {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: .92em;
}

.wvpt-field input,
.wvpt-field select,
.wvpt-field textarea {
	width: 100%;
	margin-bottom: 0;
}

.wvpt-field--checkboxes,
.wvpt-field--textarea,
.wvpt-field--file {
	grid-column: 1 / -1;
}

.wvpt-field fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

.wvpt-check {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	margin: 0 18px 6px 0;
	font-weight: 400 !important;
}

.wvpt-check input {
	width: auto;
	margin: 0;
}

.wvpt-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	overflow: hidden;
}

/* Danh sách báo giá */
.wvpt-quote__title {
	font-size: 1.15em;
	margin: 0 0 12px;
}

.wvpt-quote__table {
	width: 100%;
	margin-bottom: 8px;
}

.wvpt-quote__table td,
.wvpt-quote__table th {
	vertical-align: middle;
	padding: 8px;
}

.wvpt-product {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wvpt-product img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border: 1px solid var(--wvpt-border);
	border-radius: 4px;
}

.wvpt-qty {
	width: 110px;
}

.wvpt-qty-input {
	margin: 0 !important;
	max-width: 90px;
}

.wvpt-remove {
	width: 40px;
	text-align: center;
}

.wvpt-remove-item {
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	margin: 0;
	padding: 4px 8px;
}

.wvpt-remove-item:hover {
	color: var(--wvpt-primary);
}

.wvpt-quote__empty,
.wvpt-quote__hint {
	color: #666;
	font-size: .92em;
}

.wvpt-quote__form {
	margin-top: 24px;
	padding: 20px;
	border: 1px solid var(--wvpt-border);
	border-radius: var(--wvpt-radius);
}

.wvpt-quote__message.is-success {
	color: #1a7f37;
	font-weight: 600;
}

.wvpt-quote__message.is-error {
	color: #c62828;
	font-weight: 600;
}

/* Nút "+ Báo giá" trong lưới sản phẩm */
.wvpt-add-to-quote--loop {
	display: inline-block;
	margin: 6px 0 0;
	padding: 2px 10px;
	min-height: 0;
	line-height: 1.8;
	font-size: .8em;
	border: 1px solid var(--wvpt-primary);
	border-radius: 4px;
	background: #fff;
	color: var(--wvpt-primary);
	cursor: pointer;
	text-transform: none;
}

.wvpt-add-to-quote--loop:hover {
	background: var(--wvpt-primary);
	color: #fff;
}

/* Thông báo nhỏ */
.wvpt-toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100000;
	display: flex;
	gap: 12px;
	align-items: center;
	max-width: calc(100% - 40px);
	padding: 12px 16px;
	border-radius: var(--wvpt-radius);
	background: var(--wvpt-dark);
	color: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}

.wvpt-toast.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.wvpt-toast a {
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
}

/* Portfolio công trình */
.wvpt-projects__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.wvpt-filter {
	margin: 0;
	padding: 6px 14px;
	border: 1px solid var(--wvpt-border);
	border-radius: 20px;
	background: #fff;
	color: #333;
	font-size: .9em;
	text-transform: none;
	cursor: pointer;
}

.wvpt-filter span {
	color: #888;
}

.wvpt-filter.is-active {
	background: var(--wvpt-primary);
	border-color: var(--wvpt-primary);
	color: #fff;
}

.wvpt-filter.is-active span {
	color: rgba(255, 255, 255, .85);
}

.wvpt-projects__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.wvpt-project[hidden] {
	display: none;
}

.wvpt-project__link {
	display: block;
	height: 100%;
	border: 1px solid var(--wvpt-border);
	border-radius: var(--wvpt-radius);
	overflow: hidden;
	color: inherit;
	transition: box-shadow .2s;
}

.wvpt-project__link:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
}

.wvpt-project__image {
	display: block;
	aspect-ratio: 4 / 3;
	background: #f4f4f4;
}

.wvpt-project__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wvpt-project__body {
	display: block;
	padding: 12px 14px;
}

.wvpt-project__cat {
	display: block;
	font-size: .75em;
	text-transform: uppercase;
	color: var(--wvpt-primary);
	margin-bottom: 4px;
}

.wvpt-project__title {
	display: block;
	font-weight: 600;
	line-height: 1.4;
}

/* Công cụ tính bình chữa cháy */
.wvpt-calc__levels {
	border: 0;
	padding: 0;
	margin: 0 0 16px;
}

.wvpt-calc__levels legend {
	font-weight: 600;
	margin-bottom: 8px;
}

.wvpt-level {
	display: block;
	padding: 10px 12px 10px 36px;
	margin-bottom: 8px;
	border: 1px solid var(--wvpt-border);
	border-radius: var(--wvpt-radius);
	position: relative;
	cursor: pointer;
}

.wvpt-level input {
	position: absolute;
	left: 12px;
	top: 14px;
	margin: 0;
}

.wvpt-level small {
	display: block;
	color: #666;
}

.wvpt-level:has(input:checked) {
	border-color: var(--wvpt-primary);
	background: #fff5f5;
}

.wvpt-calc__box {
	margin: 20px 0;
	padding: 18px 20px;
	border-left: 4px solid var(--wvpt-primary);
	background: #fafafa;
	border-radius: 0 var(--wvpt-radius) var(--wvpt-radius) 0;
}

.wvpt-calc__total {
	font-size: 1.2em;
}

.wvpt-calc__total strong {
	font-size: 1.6em;
	color: var(--wvpt-primary);
}

.wvpt-calc__total span {
	font-size: .75em;
	color: #666;
}

.wvpt-calc__note,
.wvpt-calc__hint {
	font-size: .85em;
	color: #666;
}

/* Tra cứu bảo hành */
.wvpt-warranty__card {
	margin-top: 20px;
	padding: 16px 20px;
	border: 1px solid var(--wvpt-border);
	border-left: 4px solid #999;
	border-radius: var(--wvpt-radius);
}

.wvpt-warranty__card.is-active {
	border-left-color: #1a7f37;
}

.wvpt-warranty__card.is-expired {
	border-left-color: #c62828;
}

/* Cổng bảo hành mở rộng (1.9.0): lịch sử bảo trì, thiết bị khác cùng số điện thoại */
.wvpt-warranty__sub {
	margin: 16px 0 8px;
	font-size: 1em;
}

.wvpt-warranty__history {
	margin: 0 0 0 1.2em;
}

.wvpt-warranty__history li {
	margin-bottom: 4px;
}

.wvpt-warranty__others {
	width: 100%;
	font-size: .9em;
}

.wvpt-warranty__others .is-expired td:nth-child(3) {
	color: #b32d2e;
}

.wvpt-warranty__label {
	display: none; /* chỉ hiện khi bảng xếp dọc trên mobile (không có tiêu đề cột) */
}

@media (max-width: 549px) {
	.wvpt-warranty__others thead {
		display: none;
	}

	.wvpt-warranty__others tr,
	.wvpt-warranty__others td {
		display: block;
		padding: 2px 0;
		border: 0;
	}

	.wvpt-warranty__others tr {
		padding: 8px 0;
		border-bottom: 1px solid var(--wvpt-border);
	}

	.wvpt-warranty__label {
		display: inline;
		color: #646970;
	}
}

.wvpt-warranty__status {
	font-weight: 700;
	font-size: 1.1em;
}

.wvpt-warranty__card th {
	width: 40%;
	font-weight: 600;
}

@media (max-width: 849px) {
	.wvpt-projects__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 549px) {
	.wvpt-grid,
	.wvpt-projects__grid {
		grid-template-columns: 1fr;
	}

	.wvpt-qty {
		width: 80px;
	}
}

/* Đặt lịch khảo sát [wvpt_booking] (1.7.0). Mặc định nền sáng; trong khung đỏ "Đặt cuộc hẹn" của trang chủ (.antoan-booking) chữ trắng. */
.wvpt-booking__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.wvpt-booking__field {
	min-width: 0;
	margin: 0;
}

.wvpt-booking__field--note,
.wvpt-booking__field--when,
.wvpt-booking__slots {
	grid-column: 1 / -1;
}

.wvpt-booking input,
.wvpt-booking select,
.wvpt-booking textarea {
	width: 100%;
	margin: 0;
}

.wvpt-booking textarea {
	min-height: 64px;
}

.wvpt-booking label,
.wvpt-booking legend {
	display: block;
	width: auto;
	margin: 0 0 4px;
	padding: 0;
	border: 0;
	font-weight: 600;
	font-size: .9em;
	text-transform: none;
	letter-spacing: 0;
}

.wvpt-booking__slots {
	border: 0;
	margin: 0;
	padding: 0;
}

.wvpt-booking__slot-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 8px;
}

.wvpt-booking .wvpt-slot { /* thắng luật label chung của form (display: block) */
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 44px; /* vùng bấm đủ lớn trên mobile */
	margin: 0;
	padding: 6px 8px;
	border: 1px solid var(--wvpt-border);
	border-radius: var(--wvpt-radius);
	background: #fff;
	color: var(--wvpt-dark);
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}

.wvpt-slot input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.wvpt-slot:has(input:checked) {
	border-color: var(--wvpt-dark);
	background: var(--wvpt-dark);
	color: #fff;
}

.wvpt-slot:has(input:focus-visible) {
	outline: 2px solid var(--wvpt-dark);
	outline-offset: 2px;
}

.wvpt-slot.is-full {
	opacity: .55;
	cursor: not-allowed;
	text-decoration: line-through;
}

.wvpt-slot small {
	font-weight: 400;
	font-size: .75em;
	text-decoration: none;
}

.wvpt-booking__hint {
	margin: 0;
	font-size: .9em;
	opacity: .85;
}

.wvpt-booking button.wvpt-booking__submit {
	width: 100%;
	margin: 14px 0 0;
}

.wvpt-booking__message {
	margin: 10px 0 0;
	font-weight: 600;
}

.wvpt-booking__message:empty {
	display: none;
}

.wvpt-booking__message.is-error {
	color: #b32d2e;
}

.wvpt-booking__message.is-success {
	color: #1e6b34;
}

/* Trong khung đỏ trang chủ */
.antoan-booking .wvpt-booking label,
.antoan-booking .wvpt-booking legend,
.antoan-booking .wvpt-booking__hint {
	color: #fff;
}

.antoan-booking .wvpt-booking select {
	background-color: #fff;
	border: 0;
	border-radius: 4px;
	color: #333;
}

.antoan-booking .wvpt-booking .wvpt-slot {
	border-color: #fff;
	color: var(--wvpt-dark); /* luật chữ trắng của label trong khung đỏ không áp vào ô khung giờ (nền trắng) */
}

.antoan-booking .wvpt-booking .wvpt-slot:has(input:checked) {
	color: #fff;
}

.antoan-booking .wvpt-slot:has(input:checked) {
	border-color: #111;
	background: #111;
}

.antoan-booking .wvpt-slot:has(input:focus-visible) {
	outline-color: #fff;
}

.antoan-booking .wvpt-booking__submit {
	background: #111;
	color: #fff;
	border-radius: 4px;
}

.antoan-booking .wvpt-booking__message,
.antoan-booking .wvpt-booking__message.is-error,
.antoan-booking .wvpt-booking__message.is-success {
	padding: 8px 10px;
	border-radius: 4px;
	background: #fff;
}

@media (max-width: 549px) {
	.wvpt-booking__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.wvpt-booking__slot-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Trợ lý tư vấn AI (1.8.0): nút mở góc phải, phía trên nút "về đầu trang" của Flatsome (nút đó cách đáy ~57–92px), khung chat cố định. */
.wvpt-ai__launcher {
	position: fixed;
	right: 20px;
	bottom: 104px;
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--wvpt-dark);
	color: #fff;
	font-weight: 700;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	cursor: pointer;
}

.wvpt-ai.is-open .wvpt-ai__launcher {
	display: none;
}

.wvpt-ai__panel {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9991;
	display: flex;
	flex-direction: column;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: min(560px, calc(100vh - 120px));
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
	overflow: hidden;
}

.wvpt-ai__panel[hidden] {
	display: none;
}

.wvpt-ai__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--wvpt-primary);
	color: #fff;
}

.wvpt-ai__close {
	min-width: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.wvpt-ai__log {
	flex: 1;
	padding: 12px;
	overflow-y: auto;
	background: #f6f7f8;
}

.wvpt-ai__msg {
	max-width: 88%;
	margin: 0 0 10px;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fff;
	color: var(--wvpt-dark);
	font-size: .92em;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.wvpt-ai__msg p {
	margin: 0;
	white-space: pre-line;
}

.wvpt-ai__msg--user {
	margin-left: auto;
	background: var(--wvpt-dark);
	color: #fff;
}

.wvpt-ai__msg.is-waiting {
	opacity: .7;
	font-style: italic;
}

.wvpt-ai__msg.is-error {
	background: #fce8e8;
	color: #8a1f1f;
}

.wvpt-ai__sources {
	margin-top: 6px !important;
	font-size: .9em;
}

.wvpt-ai__sources a,
.wvpt-ai__note a {
	color: var(--wvpt-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wvpt-ai__form {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 10px 12px 0;
	border-top: 1px solid var(--wvpt-border);
}

.wvpt-ai__form textarea {
	flex: 1;
	min-height: 44px;
	margin: 0;
	resize: none;
}

.wvpt-ai__form .button {
	margin: 0;
	align-self: stretch;
}

.wvpt-ai__note {
	margin: 0;
	padding: 6px 12px 10px;
	font-size: .75em;
	color: #646970;
}

/* Mobile / tablet (≤1025px): thanh CTA dưới cùng cao 56px, nút "về đầu trang" ở 70px → nút tròn gọn ở 122px */
@media (max-width: 1025px) {
	.wvpt-ai__launcher {
		right: 12px;
		bottom: 122px;
		width: 48px;
		height: 48px;
		padding: 0;
		justify-content: center;
		font-size: 20px;
	}

	.wvpt-ai__launcher-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.wvpt-ai__panel {
		right: 16px;
		bottom: 66px; /* trên thanh CTA */
		height: min(520px, calc(100vh - 140px));
	}
}
