/* ===== Form wrapper (áp dụng cho cả form cũ và mới) ===== */
.bhtv-form, .bhtv2-form {
  --bhtv2-radius: 12px;
  --bhtv2-gap: 14px;
  --bhtv2-input-h: 48px;
}

/* 1) Ẩn hoàn toàn radio kiểu btn-check */
.bhtv-form .btn-check,
.bhtv2-form .btn-check,
.bhtv-form input[type="radio"].btn-check,
.bhtv2-form input[type="radio"].btn-check {
  position: absolute !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}

/* 2) Segmented buttons: đồng bộ chiều cao, bo góc */
.bhtv-form .btn-group .btn,
.bhtv2-form .btn-group .btn,
.bhtv-form .btn-group-vertical .btn,
.bhtv2-form .btn-group-vertical .btn {
  height: var(--bhtv2-input-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--bhtv2-radius);
  font-weight: 600;
  letter-spacing: .1px;
}

/* 2.1) Nhóm EV full-width, mỗi nút chiếm 50% */
.bhtv-form #evOptions .btn-group,
.bhtv2-form #evOptions .btn-group { width: 100%; }
.bhtv-form #evOptions .btn-group .btn,
.bhtv2-form #evOptions .btn-group .btn { flex: 1 1 50%; }

/* 2.1b) Mục đích sử dụng (mimic EV segmented) */
#mucDichGroup { width: 100%; }
#mucDichGroup .btn { flex: 1 1 50%; border-width: 1px; }
#mucDichGroup .btn:first-of-type {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
#mucDichGroup .btn:last-of-type {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px; /* nối viền liền mạch */
}

/* 2.2) Trạng thái checked khi không có theme Bootstrap */
.bhtv-form .btn-check:checked + .btn,
.bhtv2-form .btn-check:checked + .btn {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}
.bhtv-form .btn:focus, .bhtv2-form .btn:focus {
  box-shadow: 0 0 0 .15rem rgba(13,110,253,.25);
}

/* 3) Ô nhập/Select2 đồng bộ kích thước, bo góc */
.bhtv-form .form-control,
.bhtv-form .form-select,
.bhtv2-form .form-control,
.bhtv2-form .form-select {
  height: var(--bhtv2-input-h);
  border-radius: var(--bhtv2-radius);
}

.bhtv-form .form-floating > .form-control,
.bhtv-form .form-floating > .form-select,
.bhtv2-form .form-floating > .form-control,
.bhtv2-form .form-floating > .form-select {
  height: calc(var(--bhtv2-input-h) + 10px);
  min-height: calc(var(--bhtv2-input-h) + 10px);
  line-height: 1.25;
  border-radius: var(--bhtv2-radius);
}

/* Select2 khớp Bootstrap */
.bhtv-form .select2-container .select2-selection--single,
.bhtv2-form .select2-container .select2-selection--single {
  height: var(--bhtv2-input-h) !important;
  border-radius: var(--bhtv2-radius) !important;
  border: 1px solid #ced4da !important;
  display: flex; align-items: center;
}
.bhtv-form .select2-container .select2-selection__rendered,
.bhtv2-form .select2-container .select2-selection__rendered {
  line-height: normal !important;
  padding-left: 12px !important;
}
.bhtv-form .select2-container .select2-selection__arrow,
.bhtv2-form .select2-container .select2-selection__arrow {
  height: 100% !important;
}

/* Nhãn và khoảng cách */
.bhtv-form .form-label, .bhtv2-form .form-label { font-weight: 600; margin-bottom: 6px; }
.bhtv-form .row.g-3, .bhtv2-form .row.g-3 { row-gap: var(--bhtv2-gap); }

/* EV panel hiển thị mượt mà */
#evOptions { transition: all .2s ease; }

/* ===== Cards kết quả giữ nguyên (nếu đang dùng) ===== */
.bhtv2-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.bhtv2-card{border:1px solid #eef0f2;border-radius:14px;padding:14px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.bhtv2-card-hd{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.bhtv2-price{font-size:22px;font-weight:700;margin:6px 0}
.bhtv2-meta{font-size:12px;opacity:.8}
.bhtv2-note{font-size:13px;opacity:.9}
.bhtv2-card.success{border-color:#d1e7dd;background:#f6fffa}
.bhtv2-card.warn{border-color:#f8d7da;background:#fff8f8}
.bhtv2-card.muted{opacity:.85}
.bhtv2-badge{font-size:11px;padding:3px 8px;border-radius:999px;background:#e9ecef}
.bhtv2-badge.badge-warn{background:#f8d7da}
.bhtv2-badge.badge-mute{background:#eee}

/* Segmented EV: viền liền mạch đẹp mắt */
#evOptions .btn-group .btn { border-width: 1px; }
#evOptions .btn-group .btn:first-of-type { border-top-right-radius: 0; border-bottom-right-radius: 0; }
#evOptions .btn-group .btn:last-of-type  { border-top-left-radius: 0;  border-bottom-left-radius: 0;  margin-left: -1px; }

/* ===== Contact Info Section ===== */
#contactInfo {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}

#contactInfo h5 {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 1.25rem;
  color: #333;
}

/* Floating inputs đồng bộ với form chính */
#contactInfo .form-floating > .form-control,
#contactInfo .form-floating > .form-select {
  height: calc(var(--bhtv2-input-h) + 10px);
  min-height: calc(var(--bhtv2-input-h) + 10px);
  border-radius: var(--bhtv2-radius);
  line-height: 1.25;
  font-size: 15px;
  padding-left: 14px;
}

#contactInfo .form-floating > label {
  font-size: 14px;
  opacity: .85;
}

/* Nút submit full-width */
#contactInfo button[type="submit"] {
  height: var(--bhtv2-input-h);
  border-radius: var(--bhtv2-radius);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: all .15s ease;
}

#contactInfo button[type="submit"]:hover {
  opacity: .95;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

#contactInfo button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
/* ===== Vertical rhythm cho toàn form ===== */
.bhtv-form, .bhtv2-form {
  --bhtv2-vspace: 1.25rem; /* ~20px */
}

/* Mỗi hàng (row) có khoảng cách dưới đồng nhất */
.bhtv-form .row.g-3,
.bhtv2-form .row.g-3 { 
  row-gap: var(--bhtv2-gap);     /* khoảng cách giữa các cột trong cùng hàng */
  margin-bottom: var(--bhtv2-vspace);  /* khoảng cách giữa các hàng */
}

/* Nhãn đồng nhất spacing với input */
.bhtv-form .form-label,
.bhtv2-form .form-label { 
  font-weight: 600; 
  margin-bottom: .5rem; /* 8px */
}

/* Select2 khớp chiều cao + full width, tránh “tụt” line-height */
.bhtv-form .select2-container,
.bhtv2-form .select2-container { width: 100% !important; }
.bhtv-form .select2-container .select2-selection--single,
.bhtv2-form .select2-container .select2-selection--single {
  height: var(--bhtv2-input-h) !important;
  display: flex; align-items: center;
}

/* Khối segKH cũng có khoảng đệm trên dưới để không dính các block khác */
#segKH { margin-top: .25rem; margin-bottom: var(--bhtv2-vspace); }

/* Nhịp dọc riêng cho panel EV để không dính */
#evOptions { margin-top: .25rem; margin-bottom: var(--bhtv2-vspace); }