/**
 * Custom CSS cho Contact Form 7 trong modal tư vấn
 */

/* Style cho form trong modal */
.modal1 .wpcf7-form {
  margin: 0;
  padding: 0;
  color: white;
  position: relative;
  z-index: 5;
}

/* Đảm bảo form tư vấn không bị ảnh hưởng bởi CSS khác */
.modal1 .wpcf7-form * {
  pointer-events: auto !important;
}

.modal1 .wpcf7-form input,
.modal1 .wpcf7-form select,
.modal1 .wpcf7-form textarea {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* Style cho các input fields */
.modal1 .wpcf7-form input[type="text"],
.modal1 .wpcf7-form input[type="email"],
.modal1 .wpcf7-form input[type="tel"],
.modal1 .wpcf7-form textarea,
.modal1 .wpcf7-form select {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  font-size: 16px;
  margin-bottom: 20px;
  box-sizing: border-box;
  color: white;
  transition: border-color 0.3s ease;
}

.modal1 .wpcf7-form input[type="text"]::placeholder,
.modal1 .wpcf7-form input[type="email"]::placeholder,
.modal1 .wpcf7-form input[type="tel"]::placeholder,
.modal1 .wpcf7-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.modal1 .wpcf7-form input[type="text"]:focus,
.modal1 .wpcf7-form input[type="email"]:focus,
.modal1 .wpcf7-form input[type="tel"]:focus,
.modal1 .wpcf7-form textarea:focus,
.modal1 .wpcf7-form select:focus {
  outline: none;
  border-bottom-color: white;
  background: transparent;
}

/* Style cho textarea */
.modal1 .wpcf7-form textarea {
  resize: none;
  height: 100px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: white;
  font-family: inherit;
  line-height: 1.5;
  padding: 10px 0;
  width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
  user-select: text;
  cursor: text;
  position: relative;
  z-index: 1;
}

.modal1 .wpcf7-form textarea:focus {
  outline: none;
  border-bottom-color: white;
  background: transparent;
  pointer-events: auto;
}

.modal1 .wpcf7-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

/* Style cho select */
.modal1 .wpcf7-form select {
  background: transparent;
  cursor: pointer;
  color: white;
}

.modal1 .wpcf7-form select option {
  background: #1e3a8a;
  color: white;
}

/* Style cho submit button */
.modal1 .wpcf7-form input[type="submit"] {
  background-color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #2092cd;
}

.modal1 .wpcf7-form input[type="submit"]:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


.modal1 .wpcf7-form .wpcf7-response-output {
  margin: 10px 0;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
}

.modal1 .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.modal1 .wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.modal1 .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Style cho spinner */
.modal1 .wpcf7-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {

  .modal1 .wpcf7-form input[type="text"],
  .modal1 .wpcf7-form input[type="email"],
  .modal1 .wpcf7-form input[type="tel"],
  .modal1 .wpcf7-form textarea,
  .modal1 .wpcf7-form select {
    font-size: 16px;
    /* Tránh zoom trên iOS */
  }

  .modal1 .wpcf7-form input[type="submit"] {
    padding: 15px 30px;
    font-size: 18px;
  }
}

/* Style cho form layout */
.modal1 .wpcf7-form .f-space05 {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.modal1 .wpcf7-form .form_input1 {
  flex: 1;
  min-width: 200px;
}

.modal1 .wpcf7-form .form_input1:last-child {
  flex-basis: 100%;
}

/* Style cho label */
.modal1 .wpcf7-form label {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
  margin: 10px 0 25px;
    white-space: nowrap;
}

.modal1 .wpcf7-form label select {
  border: none;
  padding: 0;
  margin: 0;
  font-weight: normal;
}

.modal1 .wpcf7-form label .wpcf7-not-valid-tip {
  position: absolute;
  top: 55px;
  left: -87px;
}
.modal1 .wpcf7-response-output {
  display: none;
}


/* Cải thiện validation errors */
.modal1 .wpcf7-not-valid-tip {
  font-size: 12px;
  margin-top: -8px;
  margin-bottom: 15px;
}

.modal1 .wpcf7-form .wpcf7-response-output {
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
  border: none;
}

.modal1 .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-left: 3px solid #22c55e;
}

.modal1 .wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-left: 3px solid #ef4444;
}

.modal1 .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-left: 3px solid #ef4444;
}


/* Style cho modal background */
.modal1 {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

/* Style cho modal content */
.modal1 .modal-content {
  position: relative;
  background: #2092cd;
  margin: 10px auto;
  padding: 40px;
  border-radius: 4px;
  max-width: 680px;
  width: 90%;
  /* max-height: 80vh; */
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Style cho title */
.modal1 .left_pu h3 {
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Style cho close button */
.modal1 .close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}


/* Style cho hotline */
.modal1 .csdta {
  text-align: center;
  margin-top: 15px;
}

.modal1 .csdta a {
  color: white;
  display: inline-block;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Responsive cho modal */
@media (max-width: 768px) {
  .modal1 .modal-content {
    margin: 10% auto;
    width: 95%;
    max-height: 85vh;
    padding: 50px 20px;
  }

  .modal1 .left_pu h3 {
    font-size: 20px;
    line-height: 26px;
    margin-bottom: 25px;
  }

  .modal1 .wpcf7-form input[type="text"],
  .modal1 .wpcf7-form input[type="email"],
  .modal1 .wpcf7-form input[type="tel"],
  .modal1 .wpcf7-form textarea,
  .modal1 .wpcf7-form select {
    font-size: 16px;
    /* Tránh zoom trên iOS */
  }

  .modal1 .wpcf7-form input[type="submit"] {
    padding: 15px 30px;
    font-size: 16px;
  }
  
  .vpdn-modal.consultation-success .vpdn-modal-title {
    font-size: 20px;
  }
  
  .vpdn-modal.consultation-success .vpdn-modal-content p {
    font-size: 14px;
  }
}