/* Popup CF7 - có tiền tố riêng để tránh đè CSS của Flatsome/CF7. */
.child-cf7-popup[hidden] {
  display: none !important;
}

.child-cf7-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: child-cf7-popup-fade-in 180ms ease-out both;
}

.child-cf7-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.child-cf7-popup__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  width: min(790px, 100%);
  max-height: min(640px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.child-cf7-popup__image {
  min-height: 420px;
  background-color: #e9e9e9;
  background-position: center;
  background-size: cover;
}

.child-cf7-popup__content {
  min-width: 0;
  overflow-y: auto;
  padding: 52px 46px 38px;
}

.child-cf7-popup__intro {
  margin: 0 0 22px;
}

.child-cf7-popup__title {
  margin: 0 0 8px;
  color: #c40000;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

.child-cf7-popup__description {
  max-width: 430px;
  margin: 0;
  color: #4b4b4b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}

.child-cf7-popup__close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #333;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  opacity: 0.86;
  padding: 0;
  box-shadow: none;
  appearance: none;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.child-cf7-popup__close::before,
.child-cf7-popup__close::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 6px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.child-cf7-popup__close::before {
  transform: rotate(45deg);
}

.child-cf7-popup__close::after {
  transform: rotate(-45deg);
}

.child-cf7-popup__close:hover,
.child-cf7-popup__close:focus-visible {
  background: #f2f2f2;
  color: #111;
  opacity: 1;
  outline: none;
}

.child-cf7-popup__form,
.child-cf7-popup__form form {
  width: 100%;
}

.child-cf7-popup__form form,
.child-cf7-popup__form .wpcf7,
.child-cf7-popup__form .loan-calculator-wrapper,
.child-cf7-popup__form .contact-form-wrapper {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.child-cf7-popup__form p {
  margin: 0;
}

.child-cf7-popup__form .group-form {
  margin: 0 0 14px;
}

.child-cf7-popup__form label {
  display: block;
  margin: 0 0 7px;
  color: #252525;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.child-cf7-popup__form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.child-cf7-popup__form select,
.child-cf7-popup__form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  background: #fff;
  box-shadow: none;
  color: #222;
  font-size: 15px;
  line-height: 1.4;
  padding: 10px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.child-cf7-popup__form textarea {
  min-height: 90px;
}

.child-cf7-popup__form input:focus,
.child-cf7-popup__form select:focus,
.child-cf7-popup__form textarea:focus {
  border-color: #222;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07);
  outline: 0;
}

.child-cf7-popup__form .wpcf7-not-valid-tip {
  display: block;
  box-sizing: border-box;
  margin: 7px 0 0;
  padding: 8px 10px;
  border-radius: 3px;
  background: #fff3f3;
  color: #d92323;
  font-size: 13px;
  line-height: 1.35;
}

.child-cf7-popup__form .checkbox-group {
  margin-top: 8px;
}

.child-cf7-popup__form .wpcf7-acceptance,
.child-cf7-popup__form .wpcf7-list-item {
  display: block;
  margin: 0;
}

.child-cf7-popup__form .wpcf7-list-item label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  color: #292929;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.child-cf7-popup__form input[type="checkbox"] {
  box-sizing: border-box;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
  margin: 2px 0 0 !important;
  border: 1px solid #b8b8b8;
  border-radius: 3px;
  background-color: #fff;
  box-shadow: none;
  cursor: pointer;
  appearance: auto;
}

.child-cf7-popup__form .wpcf7-list-item-label a {
  color: #111;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.child-cf7-popup__form input[type="submit"],
.child-cf7-popup__form button[type="submit"] {
  min-height: 46px;
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 13px 18px;
  text-transform: uppercase;
  transition: background-color 160ms ease;
}

.child-cf7-popup__form input[type="submit"]:hover,
.child-cf7-popup__form button[type="submit"]:hover {
  background: #444;
}

.child-cf7-popup__form .wpcf7-spinner {
  display: block;
  margin: 10px auto 0;
}

.child-cf7-popup__form .wpcf7-response-output {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.4;
}

html.child-cf7-popup-open,
body.child-cf7-popup-open {
  overflow: hidden;
}

@keyframes child-cf7-popup-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .child-cf7-popup {
    align-items: flex-start;
    overflow-y: auto;
    padding: 14px;
  }

  .child-cf7-popup__dialog {
    grid-template-columns: 1fr;
    max-height: none;
    margin: auto 0;
  }

  .child-cf7-popup__image {
    min-height: 180px;
    max-height: 230px;
  }

  .child-cf7-popup__content {
    padding: 42px 22px 24px;
  }

  .child-cf7-popup__intro {
    margin-bottom: 18px;
  }

  .child-cf7-popup__title {
    font-size: 20px;
  }

  .child-cf7-popup__close {
    top: 10px;
    right: 12px;
  }
}
