/* Webvina Quote - danh sách báo giá. Màu chính lấy theo theme (--primary-color của Flatsome), có giá trị dự phòng. */
:root {
	--wvq-primary: var(--primary-color, #0060aa);
	--wvq-dark: #1f2933;
	--wvq-border: #dedede;
	--wvq-radius: 5px;
}

/* Form */
.wvq-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 20px;
}

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

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

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

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

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

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

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

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

/* Ô đồng ý xử lý dữ liệu cá nhân */
.wvq-consent {
	margin: 4px 0 16px;
	font-size: .92em;
}

.wvq-consent label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-weight: 400;
	cursor: pointer;
}

.wvq-consent input {
	flex: none;
	width: auto;
	margin: 4px 0 0;
}

/* Ô đồng ý trong form đặt lịch: thắng luật label chung của form đặt lịch (display: block, chữ đậm). */
.wvq-booking .wvq-consent {
	margin: 14px 0 0;
}

.wvq-booking .wvq-consent label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 0;
	font-weight: 400;
	font-size: 1em;
}

/* Luật ".wvq-booking input { width: 100% }" của form đặt lịch nạp sau: giữ ô tích ở kích thước tự nhiên. */
.wvq-booking .wvq-consent input {
	flex: none;
	width: auto;
	margin: 4px 0 0;
}

/* Danh sách */
.wvq-quote__title {
	font-size: 1.2em;
	margin: 0 0 12px;
}

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

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

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

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

.wvq-qty {
	width: 110px;
}

.wvq-quote__table .wvq-qty-input {
	margin: 0;
	max-width: 90px;
}

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

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

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

.wvq-quote__empty,
.wvq-quote__hint {
	color: #555;
	font-size: .92em;
}

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

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

.wvq-quote__message.is-error {
	color: #b32d2e;
	font-weight: 600;
}

/* Nút "+ Báo giá" trong lưới sản phẩm */
.wvq-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(--wvq-primary);
	border-radius: 4px;
	background: #fff;
	color: var(--wvq-primary);
	cursor: pointer;
	text-transform: none;
}

.wvq-add-to-quote--loop:hover,
.wvq-add-to-quote--loop:focus-visible {
	background: var(--wvq-primary);
	color: #fff;
}

/* Thông báo nhỏ */
.wvq-toast {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 100000;
	display: flex;
	gap: 12px;
	align-items: center;
	max-width: calc(100% - 40px);
	padding: 12px 16px;
	border-radius: var(--wvq-radius);
	background: var(--wvq-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;
}

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

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

/* Badge số mục (theme đặt [data-wvq-quote-count] ở nút header) */
.wvq-badge {
	display: inline-block;
	min-width: 18px;
	height: 18px;
	margin-left: 4px;
	padding: 0 5px;
	border-radius: 9px;
	background: #ffb400;
	color: #111;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	vertical-align: middle;
}

.wvq-badge.is-empty {
	display: none;
}

/* Đặt lịch khảo sát ([wvq_booking], chuyển từ Webvina PCCC Tools). */
.wvq-booking__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

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

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

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

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

.wvq-booking label,
.wvq-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;
}

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

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

.wvq-booking .wvq-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(--wvq-border);
	border-radius: var(--wvq-radius);
	background: #fff;
	color: var(--wvq-primary);
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}

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

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

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

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

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

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

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

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

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

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

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

/* Trong khung đỏ trang chủ */

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

	.wvq-grid {
		grid-template-columns: 1fr;
	}

	.wvq-qty {
		width: 80px;
	}

	.wvq-quote__form {
		padding: 14px;
	}
}
