/* =========================================================
   HOME TOOLS - DOMESTIC + INTERNATIONAL
   ========================================================= */

/* ---------- Domestic ---------- */
#tools .vt-tools__dom-wrap {
  width: 100%;
}

#tools .vt-tools__dom-head {
  margin-bottom: 10px;
}

#tools .vt-tools__dom-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  align-items: start;
  gap: 24px;
}

#tools .vt-tools__content--dom,
#tools .vt-tools__hero--dom {
  min-width: 0;
}

#tools .vt-tools__hero--dom {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding-top: 4px;
}

#tools .vt-tools__illus--dom {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

#tools .vt-tools__illus--dom img {
  display: block;
  width: 100%;
  height: auto;
}

#tools .vt-tools__content--dom .form-control,
#tools .vt-tools__content--dom .form-select {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

#tools #dom_quote_from_text,
#tools #dom_quote_province_text,
#tools #dom_quote_from_province,
#tools #dom_quote_province {
  width: 100%;
}

#tools #dom_quote_from_text,
#tools #dom_quote_province_text {
  height: 44px;
}

/* ---------- Quote result box (shared) ---------- */
#tools .vt-track-live--quote {
  width: 100%;
  margin-top: 16px;
}

#tools .vt-track-live--quote .vt-track-live__card {
  display: block;
}

#tools .vt-track-live--quote .vt-track-live__tablewrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

#tools .vt-track-live--quote .vt-track-live__table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
}

#tools .vt-track-live--quote .vt-track-live__table th,
#tools .vt-track-live--quote .vt-track-live__table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f2;
  vertical-align: middle;
  text-align: left;
}

#tools .vt-track-live--quote .vt-track-live__table thead th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #334155;
  white-space: nowrap;
}

#tools .vt-track-live--quote .vt-track-live__table tbody tr:last-child td {
  border-bottom: none;
}

#tools .vt-track-live--quote .vt-track-live__table th.r,
#tools .vt-track-live--quote .vt-track-live__table td.r {
  text-align: right;
  white-space: nowrap;
}

#tools .vt-track-live--quote .vt-track-live__table .svc-name {
  font-weight: 700;
  color: #0f172a;
}

#tools .vt-track-live--quote .vt-track-live__table .svc-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

#tools .vt-track-live--quote .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

#tools .vt-track-live--quote .vt-note {
  margin-top: 12px;
}

/* ---------- International ---------- */
#tools .vt-tools__intl-wrap {
  width: 100%;
}

#tools .vt-tools__intl-head {
  margin-bottom: 10px;
}

#tools .vt-tools__intl-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  align-items: start;
  gap: 24px;
}

#tools .vt-tools__content--intl,
#tools .vt-tools__hero--intl {
  min-width: 0;
}

#tools .vt-tools__hero--intl {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding-top: 4px;
}

#tools .vt-tools__illus--intl {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

#tools .vt-tools__illus--intl img {
  display: block;
  width: 100%;
  height: auto;
}

/* Ẩn phần mô tả + pills nếu HTML còn tồn tại */
#tools .vt-tools__content--intl .vt-tools__lead,
#tools .vt-tools__content--intl .vt-tools__intl-pills {
  display: none !important;
}

/* helper */
#tools .vt-tools__intl-hidden {
  display: none !important;
}

#tools .vt-tools__intl-hint {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

/* Hàng 2: khối lượng + kích thước cùng 1 hàng */
#tools .vt-tools__intl-row2 {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2.1fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

#tools .vt-tools__intl-dims-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#tools .vt-tools__intl-dims-inline .form-control {
  height: 44px;
}

/* fallback nếu HTML cũ vẫn còn dùng class dims */
#tools .vt-tools__intl-dims {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#tools .vt-tools__intl-dims .form-control {
  height: 44px;
}

#tools #intl_quote_country_text,
#tools #intl_quote_province_text,
#tools #intl_quote_weight_kg,
#tools #intl_quote_length_cm,
#tools #intl_quote_width_cm,
#tools #intl_quote_height_cm,
#tools #intl_quote_service {
  width: 100%;
  height: 44px;
}

/* nếu select dịch vụ cũ vẫn còn render thì ẩn đi */
#tools label[for="intl_quote_service"],
#tools select#intl_quote_service {
  display: none !important;
}

/* ---------- International result: compact summary row ---------- */
#tools .vt-track-live--intlquote .vt-intl-summary {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.55fr) minmax(150px, 1fr) minmax(130px, 0.82fr)
    minmax(150px, 0.9fr) minmax(170px, 1.05fr);
  gap: 10px;
  margin-top: 4px;
  align-items: stretch;
}

#tools .vt-track-live--intlquote .vt-intl-summary__item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  min-width: 0;
}

#tools .vt-track-live--intlquote .vt-intl-summary__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.35;
  margin-bottom: 8px;
}

#tools .vt-track-live--intlquote .vt-intl-summary__value {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.22;
  word-break: break-word;
}

#tools .vt-track-live--intlquote .vt-intl-summary__value--route {
  font-size: 20px;
}

#tools .vt-track-live--intlquote .vt-intl-summary__value--total {
  color: #15803d;
}

#tools .vt-track-live--intlquote .vt-track-live__card {
  display: block;
}

#tools .vt-track-live--intlquote .vt-note,
#tools .vt-track-live--intlquote .vt-track-live__tablewrap {
  display: none !important;
}

#tools .vt-track-live--intlquote .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  #tools .vt-tools__dom-top,
  #tools .vt-tools__intl-top {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #tools .vt-tools__illus--dom,
  #tools .vt-tools__illus--intl {
    max-width: 170px;
  }
}

@media (max-width: 767.98px) {
  #tools .vt-tools__intl-row2 {
    grid-template-columns: 1fr;
  }

  #tools .vt-track-live--intlquote .vt-intl-summary {
    grid-template-columns: 1fr;
  }

  #tools .vt-tools__intl-dims-inline,
  #tools .vt-tools__intl-dims {
    grid-template-columns: 1fr;
  }

  #tools .vt-track-live--quote .vt-track-live__table {
    min-width: 560px;
  }
}

/* ===== Signup form compact theo mẫu mới ===== */
#tools .vt-tools__signup-form {
  display: grid;
  gap: 14px;
}

#tools .vt-tools__signup-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#tools .vt-tools__signup-form .vt-field {
  min-width: 0;
}

#tools .vt-tools__signup-form .vt-field--full {
  grid-column: 1 / -1;
}

#tools .vt-tools__signup-form .form-control,
#tools .vt-tools__signup-form .form-select {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  height: 44px;
}

#tools .vt-tools__signup-form textarea.form-control {
  height: auto;
  min-height: 110px;
}

#tools .vt-tools__signup-form .vt-tools__alert {
  margin-bottom: 2px;
}

#tools .vt-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 767.98px) {
  #tools .vt-tools__signup-grid2 {
    grid-template-columns: 1fr;
  }
}

/* ===== Signup success modal ===== */
#tools .vt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
}

#tools .vt-modal.is-open {
  display: flex;
}

#tools .vt-modal__dialog {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: vtModalPop 0.22s ease-out;
}

#tools .vt-modal__head {
  display: flex;
  justify-content: flex-end;
  padding: 14px 14px 0;
}

#tools .vt-modal__close {
  border: 0;
  background: #f1f5f9;
  color: #0f172a;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

#tools .vt-modal__close:hover {
  background: #e2e8f0;
}

#tools .vt-modal__body {
  padding: 4px 28px 28px;
  text-align: center;
}

#tools .vt-modal__icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.28);
}

#tools .vt-modal__icon svg {
  width: 40px;
  height: 40px;
}

#tools .vt-modal__title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}

#tools .vt-modal__text {
  margin: 0 auto;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.7;
  color: #475569;
}

#tools .vt-modal__actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

#tools .vt-modal__btn {
  min-width: 170px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #15803d;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.22);
}

#tools .vt-modal__btn:hover {
  background: #166534;
}

body.vt-modal-open {
  overflow: hidden;
}

@keyframes vtModalPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 575.98px) {
  #tools .vt-modal__body {
    padding: 0 18px 22px;
  }

  #tools .vt-modal__title {
    font-size: 22px;
  }

  #tools .vt-modal__text {
    font-size: 15px;
  }
}
