/* ==========================================================================
   TBS Quote – Form báo giá + popup
   ========================================================================== */
.tbs-qf, .tbs-qmodal {
	--q-primary: #0c486b;
	--q-accent: #b30909;
	--q-ink: #1b2733;
	--q-text: #3d4a57;
	--q-muted: #566370;
	--q-line: #dfe5eb;
	--q-bg: #f5f8fa;
	--q-radius: 10px;
}
.tbs-qf { position: relative; color: var(--q-text); font-size: 14.5px; }
.tbs-qf *, .tbs-qf *::before, .tbs-qf *::after { box-sizing: border-box; }
.tbs-qf .tbs-ico { flex: none; }
.tbs-qf__head { margin-bottom: 14px; }
.tbs-qf__title { margin: 0 0 4px; font-size: 19px; line-height: 1.3; font-weight: 700; color: var(--q-ink); }
.tbs-qf__desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--q-muted); }

.tbs-qf__product {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 12px; margin-bottom: 14px;
	background: #eef5f9; border: 1px dashed rgba(12, 72, 107, .35); border-radius: var(--q-radius);
	color: var(--q-primary);
}
.tbs-qf__product[hidden] { display: none; }
.tbs-qf__product .tbs-ico { width: 22px; height: 22px; }
.tbs-qf__product span { display: flex; flex-direction: column; min-width: 0; }
.tbs-qf__product small { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--q-muted); }
.tbs-qf__product strong { font-size: 14px; line-height: 1.35; color: var(--q-ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.tbs-qf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tbs-qf--inline .tbs-qf__grid { grid-template-columns: 1fr; }
.tbs-qf__field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tbs-qf__field[hidden] { display: none; }
.tbs-qf__field--full, .tbs-qf__field--product { grid-column: 1 / -1; }
.tbs-qf__field label { margin: 0; font-size: 13px; font-weight: 600; color: var(--q-ink); }
.tbs-qf__field label span { color: var(--q-accent); }
.tbs-qf__field label em { font-weight: 400; font-style: normal; color: var(--q-muted); }
.tbs-qf input[type=text], .tbs-qf input[type=tel], .tbs-qf input[type=email], .tbs-qf input[type=number], .tbs-qf textarea {
	width: 100%; height: 44px; margin: 0; padding: 0 13px;
	font: inherit; font-size: 15px; color: var(--q-ink);
	background: #fff; border: 1px solid var(--q-line); border-radius: var(--q-radius);
	box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.tbs-qf textarea { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
.tbs-qf input:focus, .tbs-qf textarea:focus { outline: none; border-color: var(--q-primary); box-shadow: 0 0 0 3px rgba(12, 72, 107, .14); }
.tbs-qf ::placeholder { color: #9aa6b2; }
.tbs-qf__field.has-error input, .tbs-qf__field.has-error textarea { border-color: var(--q-accent); box-shadow: 0 0 0 3px rgba(179, 9, 9, .1); }
.tbs-qf__err { font-size: 12.5px; color: var(--q-accent); }

.tbs-qf__qty { display: flex; height: 44px; border: 1px solid var(--q-line); border-radius: var(--q-radius); overflow: hidden; background: #fff; }
.tbs-qf .tbs-qf__qty button {
	flex: none; width: 42px; height: 100%; margin: 0; padding: 0; min-height: 0;
	background: var(--q-bg); border: 0; color: var(--q-ink); font-size: 18px; line-height: 1; cursor: pointer;
}
.tbs-qf .tbs-qf__qty button:hover { background: #e7eef3; }
.tbs-qf .tbs-qf__qty input { height: 100%; border: 0; border-radius: 0; text-align: center; padding: 0 4px; -moz-appearance: textfield; }
.tbs-qf__qty input::-webkit-inner-spin-button, .tbs-qf__qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tbs-qf__qty input:focus { box-shadow: none; }

.tbs-qf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tbs-qf__alert { margin-top: 12px; padding: 10px 12px; border-radius: var(--q-radius); background: #fdecec; color: #8a1f21; font-size: 13.5px; }
.tbs-qf__alert[hidden] { display: none; }

.tbs-qf .tbs-qf__submit {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; height: 50px; margin: 14px 0 0; padding: 0 18px;
	background: linear-gradient(180deg, #c81414, var(--q-accent)); color: #fff;
	border: 0; border-radius: var(--q-radius);
	font: inherit; font-size: 15.5px; font-weight: 700; text-transform: none; letter-spacing: 0;
	cursor: pointer; box-shadow: 0 6px 16px rgba(179, 9, 9, .25); transition: transform .15s, box-shadow .15s, opacity .15s;
}
.tbs-qf .tbs-qf__submit:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(179, 9, 9, .3); color: #fff; }
.tbs-qf .tbs-qf__submit:disabled { opacity: .75; cursor: progress; transform: none; }
.tbs-qf.is-loading .tbs-qf__submit .tbs-ico { animation: tbsq-spin .8s linear infinite; }
@keyframes tbsq-spin { to { transform: rotate(360deg); } }
.tbs-qf__note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 12px; color: var(--q-muted); }
.tbs-qf__note .tbs-ico { width: 14px; height: 14px; }

/* Thành công */
.tbs-qf__done {
	position: absolute; inset: 0; z-index: 2;
	display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
	padding: 20px; background: #fff; border-radius: var(--q-radius);
	animation: tbsq-in .25s ease;
}
.tbs-qf__done[hidden] { display: none; }
.tbs-qf__done > .tbs-ico { width: 58px; height: 58px; color: #10a35a; stroke-width: 1.6; margin-bottom: 10px; }
.tbs-qf__done-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: var(--q-ink); }
.tbs-qf__done-text { margin: 0 0 16px; max-width: 360px; line-height: 1.6; }
.tbs-qf__done-zalo { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; background: #0068ff; color: #fff !important; font-weight: 600; }
@keyframes tbsq-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* Shortcode wrapper */
.tbs-qf-wrap { max-width: 640px; padding: 22px; background: #fff; border: 1px solid var(--q-line, #dfe5eb); border-radius: 14px; box-shadow: 0 6px 20px rgba(16, 40, 60, .06); }
.tbs-qf-wrap .tbs-qf--inline .tbs-qf__grid { grid-template-columns: 1fr 1fr; }

/* ---------- Popup ---------- */
html.tbs-qmodal-open { overflow: hidden; }
.tbs-qmodal {
	width: min(640px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px);
	margin: auto; padding: 0; border: 0; border-radius: 16px; background: #fff;
	box-shadow: 0 30px 80px rgba(10, 30, 50, .35); overflow: auto;
}
.tbs-qmodal:not([open]) { display: none; }
.tbs-qmodal[open] { animation: tbsq-in .2s ease; }
.tbs-qmodal::backdrop { background: rgba(12, 28, 44, .55); backdrop-filter: blur(3px); }
.tbs-qmodal__box { position: relative; padding: 26px 26px 18px; }
.tbs-qmodal .tbs-qmodal__close {
	position: absolute; top: 12px; right: 12px; z-index: 3;
	display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: #f1f4f7; color: var(--q-ink); cursor: pointer;
}
.tbs-qmodal .tbs-qmodal__close:hover { background: #e3e9ee; }
.tbs-qmodal .tbs-qf__head { padding-right: 40px; }
.tbs-qmodal__alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef1f4; font-size: 13.5px; color: var(--q-muted); }
.tbs-qmodal__alt a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--q-primary); }
.tbs-qmodal__alt a.is-zalo { color: #0068ff; }
.tbs-qmodal__alt .tbs-ico { width: 16px; height: 16px; }

@media (max-width: 560px) {
	.tbs-qf__grid, .tbs-qf-wrap .tbs-qf--inline .tbs-qf__grid { grid-template-columns: 1fr; }
	.tbs-qmodal { width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
	.tbs-qmodal__box { padding: 22px 16px 16px; }
}
