/* ===== MODAL OVERRIDES ===== */
.modal-dialog {
  max-width: 1115px;
  width: calc(100% - 1rem);
}

.modal-content {
  border: none;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  border-radius: 30px;
  border: 0.05px solid #cacaca;
}
.modal-body {
  padding: 0;
}

/* ===== POPUP WRAPPER: FLEX ===== */
.popup-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 480px;
}

/* ===== LEFT PANEL ===== */
.popup-left {
  flex: 0 0 55%;
  max-width: 55%;
  background: linear-gradient(181deg, #0099bc -38.93%, #001f28 41.99%);
  padding: 64px 72px;
  align-items: flex-start;
  gap: 24px;
  position: relative;
}

.popup-left::after {
  content: "";
  position: absolute;
  left: -100px;
  bottom: -100px;
  width: 600px;
  height: 100%;
  pointer-events: none;
  background: url("../img/logo/Logo_e-01-full.png") no-repeat center
    center/cover;
  opacity: 0.2;
}
.popup-title {
  align-items: flex-start;
  gap: 4px;
  align-self: stretch;
}

.popup-left .tag {
  background: linear-gradient(
    180deg,
    rgba(0, 198, 239, 0.8) -173.82%,
    #fff 99.65%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 16px;
}
.popup-left h2 {
  font-family: "Saira";
  font-size: 35px;
  font-weight: 500;
}
.popup-left .check-list {
  gap: 24px;
}
.popup-left .check-item {
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
  width: fit-content;
}

.popup-left .check-item .icon {
  width: 24px;
  height: 24px;
  aspect-ratio: 1/1;
}
.popup-left .check-item h3 {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}
/* ===== RIGHT PANEL ===== */
.popup-right {
  flex: 1 1 45%;
  position: relative;
  background: #f5f5f5;
}
.popup-right .close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 30px;
  color: #888;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}
.popup-right-content {
  padding: 36px 24px;
  justify-content: center;
  align-items: flex-start;
  gap: 36px;
}
.popup-right .close-btn:hover {
  color: #333;
}

.popup-right .form-title {
  padding: 0px 30px;
  text-align: center;
  font-family: "Inter";
  font-size: 32px;
  font-weight: 600;
  background: linear-gradient(179deg, #000a19 27.84%, #00c6ef 167.33%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.popup-right .form-control {
  font-size: 14px;
  padding: 16px 16px 16px 12px;
  width: 100%;
  outline: none;
  height: 42px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  border-radius: 6px;
  border: 1px solid #d5d7da;
  color: #717680;
}

.popup-right .form-control:focus {
  border-color: #1e6fbb;
  box-shadow: 0 0 0 3px rgba(30, 111, 187, 0.15);
}
.popup-right .form-control.is-invalid {
  border-color: #e24b4a;
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.12);
}
.popup-right .form-control.is-valid {
  border-color: #1d9e75;
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}
.popup-right textarea.form-control {
  resize: none;
  height: 72px;
}

/* ===== ERROR & SUCCESS MESSAGES ===== */
.error-msg {
  display: none;
  font-size: 14px;
  color: #e24b4a;
  margin-top: 3px;
  min-height: 16px;
  line-height: 1.4;
}
.error-msg.show {
  display: block;
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
}
.agree-row input[type="checkbox"] {
  accent-color: #1570ef;
  width: 16px;
  height: 16px;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 0 0 2px 0 rgba(44, 49, 53, 0.08) inset;
}
.agree-row label {
  color: #586174;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.28px;
  cursor: pointer;
}
.agree-row label a {
  color: #1570ef;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.28px;
}
.agree-row label a:hover {
  text-decoration: underline;
}

/* ===== SUBMIT BUTTON ===== */
.btn-submit {
  width: 100%;
  padding: 12px 24px;
  background: #05b6da;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.2s,
    opacity 0.2s;
  margin-top: 8px;
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.btn-submit svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== SUCCESS BOX ===== */
.success-box {
 display: none;
  align-items: center;
  gap: 10px;
  background: #05b6da;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #fff;
  margin-top: -12px;
  line-height: 1.5;
}

@keyframes successBoxIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-box.show {
  display: flex;
  animation: successBoxIn 0.45s ease-out both;
}
.close-btn {
  background: transparent;
  border: none;
}
/* ===== PHẦN TỬ CHỈ DÀNH CHO MOBILE (ẩn ở desktop) ===== */
.field-label,
.popup-close-mobile,
.btn-back,
.mobile-box {
  display: none;
}

.modal-title-mb,
.tag-mobile {
  display: none;
}

/* ===== CF7 WRAPPER ===== */
.cf7-form-inner {
  background: #f5f5f5;
  border-radius: 20px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 540px;
  margin: 0 auto;
}

 .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
.wpcf7-list-item{
 margin: 0; 
}
.wpcf7-list-item label{
  display: flex;
  gap: 8px;
}
/* Ẩn các thứ CF7 tự thêm */
.cf7-form-inner .wpcf7-form-control-wrap {
  display: block;
}
.cf7-form-inner br {
  display: none;
}

/* ===== FORM TITLE (tuỳ chọn, thêm bằng tay ngoài shortcode nếu cần) ===== */
.cf7-form-title {
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 28px;
  font-weight: 600;
  background: linear-gradient(179deg, #000a19 27.84%, #00c6ef 167.33%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

/* ===== LABEL ===== */
.cf7-form-inner .field-label {
  display: block;
  color: #414651;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.28px;
  padding-bottom: 6px;
}
.cf7-form-inner .field-label .required {
  color: #e24b4a;
  margin-left: 2px;
}

/* ===== INPUT / TEXTAREA ===== */
.cf7-form-inner .form-control {
  font-size: 14px;
  padding: 10px 12px;
  width: 100%;
  height: 42px;
  outline: none;
  border-radius: 6px;
  border: 1px solid #d5d7da;
  color: #717680;
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.cf7-form-inner .form-control:focus {
  border-color: #1e6fbb;
  box-shadow: 0 0 0 3px rgba(30, 111, 187, 0.15);
}
.cf7-form-inner textarea.form-control {
  resize: none;
  height: 80px;
}

/* ===== CF7 VALIDATION STATES ===== */
.cf7-form-inner .wpcf7-not-valid {
  border-color: #e24b4a !important;
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.12) !important;
}
.cf7-form-inner .wpcf7-not-valid-tip {
  display: block;
  font-size: 11px;
  color: #e24b4a;
  margin-top: 4px;
  line-height: 1.4;
}

/* ===== CHECKBOX ĐỒNG Ý ===== */
.cf7-form-inner .agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #586174;
  font-weight: 500;
  line-height: 20px;
}
.cf7-form-inner .agree-row input[type="checkbox"] {
  accent-color: #1570ef;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
.cf7-form-inner .agree-row a {
  color: #1570ef;
  text-decoration: none;
  font-weight: 500;
}
.cf7-form-inner .agree-row a:hover {
  text-decoration: underline;
}
/* Ẩn label mặc định của CF7 acceptance */
.cf7-form-inner .wpcf7-acceptance .wpcf7-list-item-label {
  display: inline;
}

/* ===== NÚT GỬI ===== */
.cf7-form-inner .btn-submit,
.cf7-form-inner input[type="submit"] {
  width: 100%;
  padding: 12px 24px;
  background: #05b6da;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.2s,
    opacity 0.2s;
  margin-top: 4px;
}
.cf7-form-inner .btn-submit:disabled,
.cf7-form-inner input[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ===== RESPONSE / SUCCESS ===== */
.cf7-form-inner .wpcf7-response-output {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  border: none !important;
}
.cf7-form-inner .wpcf7-mail-sent-ok {
  background: #05b6da;
  color: #fff;
}
.cf7-form-inner .wpcf7-validation-errors,
.cf7-form-inner .wpcf7-mail-sent-ng,
.cf7-form-inner .wpcf7-spam-blocked {
  background: #fef2f2;
  color: #e24b4a;
}
.wpcf7-spinner, 
.cf7-form-inner .wpcf7-response-output,
#demoModal .wpcf7-response-output {
  display: none !important;
}

.popup-right .form-title {
  padding: 0px 30px;
  text-align: center;
  font-family: "Inter";
  font-size: 32px;
  font-weight: 600;
  background: linear-gradient(179deg, #000a19 27.84%, #00c6ef 167.33%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== MOBILE ===== */
@media (max-width: 576px) {
  .cf7-form-inner {
    padding: 20px 14px;
    border-radius: 16px;
    gap: 12px;
  }
  .cf7-form-inner .form-control {
    height: 48px;
    border-radius: 12px;
    background: #f5f5f5;
  }
  .cf7-form-inner textarea.form-control {
    height: 80px;
  }
  .cf7-form-title {
    font-size: 22px;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .modal-title-mb,
  .popup-close-mobile,
  .tag-mobile,
  .mobile-box {
    display: block;
  }
  .popup-close-mobile {
    background: transparent;
    border: none;
  }

  .mobile-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .modal {
    padding-top: 0 !important;
  }
  .modal-dialog {
    display: block; /* bỏ flex của .modal-dialog-centered để content full-width */
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 100dvh;
  }
  .modal-body {
    overflow-y: auto;
    max-height: 100dvh;
    padding: 0;
    background: transparent;
  }
  .modal-content {
    width: 100%;
    border-radius: 0;
    min-height: 100dvh;
    overflow-y: auto;
    /* Nền xanh phủ toàn modal; ô form là thẻ trắng nổi trên nền này */
    background: linear-gradient(180.7deg, #0099bc -38.93%, #001f28 41.99%);

    border-radius: 18px;
  }

  .popup-wrapper {
    flex-direction: column;
    min-height: 100dvh;
    box-sizing: border-box;
    border-radius: 18px;
    padding: 24px 16px;
    gap: 24px;
  }
  .popup-left,
  .popup-right {
    flex: unset;
    max-width: 100%;
  }

  .mobile-box {
    display: flex;
    justify-content: space-between;
  }
  /* ===== HEADER XANH: tiêu đề + mô tả + nút đóng ===== */
  .popup-left {
    background: transparent;
    padding: 0;
  }
  .popup-left > * {
    z-index: 1;
  }
  .popup-left::after {
    display: flex;
    width: 189px;
    height: 185px;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: -50px;
    bottom: -53px;
    opacity: 0.4;
    z-index: 0;
  }

  /* Ẩn nội dung marketing, chỉ giữ tiêu đề "Trải nghiệm demo" + mô tả 24/7 */
  .popup-left .popup-title .tag:first-child,
  .popup-right .close-btn,
  .popup-left .popup-title h2.text-gradient-light-base,
  .popup-left .check-list,
  .wpcf7-spinner {
    display: none;
  }
  .popup-title {
    gap: 8px;
  }
  .popup-left h2.text-white {
    font-family: "Inter";
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
  }
  .tag-mobile {
    color: var(--Text-White, #fff);
    font-family: "Roboto";
    font-size: 14px;
    font-weight: 400;
    line-height: 20px; /* 142.857% */
    letter-spacing: -0.28px;
  }
  .popup-left .popup-title .tag {
    margin: 0;
    background: none;
    -webkit-text-fill-color: #cfe8f3;
    color: #cfe8f3;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
  }

  /* ===== THẺ TRẮNG CHỨA FORM ===== */
  .popup-right {
    width: auto;
    flex: unset; /* nở để lấp đầy chiều cao còn lại, tránh khoảng tối dưới đáy */
    background: #fff;
    border-radius: 20px;
    margin: 0;
  }

  .popup-right-content {
    padding: 18px 12px;
    gap: 12px;
    align-items: stretch;
    width: 100%;
  }

  .popup-right .form-title {
    /* font-weight: 600;
    font-size: 24px; */
    display: none;
  }

  .wpcf7-form,
  .form-group,
  .agree-row {
    width: 100%;
  }
  .modal-title-mb {
    color: #fff;
    font-family: "Roboto";
    font-size: 24px;
    font-weight: 500;
  }

  /* ===== LABEL TRÊN MỖI Ô ===== */
  .field-label {
    color: #414651;
    font-family: "Roboto";
    font-size: 14px;
    font-weight: 500;
    line-height: 20px; /* 142.857% */
    letter-spacing: -0.28px;
    display: block;
    padding-bottom: 8px;
  }

  /* ===== ĐỔI THỨ TỰ: Họ tên → Tổ chức → SĐT → Email → Tin nhắn ===== */
  .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .wpcf7-form > * {
    order: 6;
  }
  .wpcf7-form > .form-group:nth-child(1) {
    order: 1;
  }
  .wpcf7-form > .form-group:nth-child(2) {
    order: 3;
  }
  .wpcf7-form > .form-group:nth-child(3) {
    order: 2;
  }
  .wpcf7-form > .form-group:nth-child(4) {
    order: 4;
  }
  .wpcf7-form > .form-group:nth-child(5) {
    order: 5;
  }

  /* ===== HÀNG NÚT: Trở lại + Gửi thông tin ===== */
  .form-actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
  }
  .btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 38%;
    padding: 12px;
    background: #fff;
    color: #05b6da;
    border: 1px solid #05b6da;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }
  .btn-submit {
    flex: 1 1 62%;
    margin-top: 0;
    box-shadow: 6px 12px 60px 0px #1570ef66;
  }

  .popup-right .form-control {
    height: 52px;
    align-items: center;
    border-radius: 18px;
    border: 1px solid #d5d7da;
    background: #f5f5f5;
  }
}

/* ===== TABLET (769–1024px): giữ layout 2 cột như desktop, tinh chỉnh vừa khổ ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Dọn nội dung trùng: ẩn phần thêm cho mobile, giữ marketing như desktop */
  .popup-title h2.text-white,
  .popup-title .tag:last-child {
    display: none;
  }

  .popup-wrapper {
    min-height: 440px;
  }

  /* Cho form (panel phải) thêm chỗ một chút so với 55/45 của desktop */
  .popup-left {
    flex: 0 0 48%;
    max-width: 48%;
    padding: 40px 32px;
    gap: 18px;
  }
  .popup-right {
    flex: 1 1 52%;
  }

  /* Giảm cỡ chữ panel trái cho cân đối */
  .popup-left h2 {
    font-size: 28px;
  }
  .popup-left .tag {
    font-size: 15px;
  }
  .popup-left .check-list {
    gap: 14px;
  }
  .popup-left .check-item {
    gap: 16px;
  }
  .popup-left .check-item h3 {
    font-size: 16px;
  }
  .popup-left::after {
    width: 100%;
    height: 80%;
  }

  /* Panel phải (form): gọn lại, vừa khổ tablet */
  .popup-right-content {
    padding: 36px 28px;
    gap: 22px;
  }
  .popup-right .form-title {
    font-size: 35px;
    padding: 0 8px;
  }
}

/* ===== ELEMENTOR EDITOR OVERRIDES ===== */
body.elementor-editor-active .header {
  position: relative !important;
}
body.elementor-editor-active .modal {
  position: relative !important;
  display: block !important;
  z-index: 1;
  opacity: 1 !important;
}
body.elementor-editor-active .modal-dialog {
  margin: 20px auto;
}
body.elementor-editor-active .modal-backdrop {
  display: none !important;
}

