/* Popup Modal Styles */

/* Modal Overlay */
.tecnic-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.tecnic-popup-overlay.active {
  display: flex;
}

/* Modal Container */
.tecnic-popup-modal {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 1350px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  animation: modalSlideIn 0.3s ease-out;
  border: 3px solid #e31837;
  padding: 50px;
  background-color: #f5f5f5;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close Button */
.tecnic-popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tecnic-popup-close:hover {
  color: #333;
}

/* Left Panel - Red Background with Content */
.tecnic-popup-left {
  background-color: #ffff;
  padding: 40px 30px;
  flex: 40%;
  min-height: 400px;
  position: relative;
  border-radius: 10px 0 0 10px;
}

.tecnic-popup-left::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  border-radius: 10px 0 0 10px;
}

.tecnic-popup-left-content {
  position: relative;
  z-index: 2;
  border: 3px solid #e31837;
  padding: 30px;
  border-radius: 10px;
  background-color: #fce3e5;
}

.tecnic-popup-title {
  font-size: 30px;
  color: #e31837;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 25px;
  text-align: center;
}

.tecnic-popup-description {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 20px;
  opacity: 0.95;
  color: #393637;
}

.tecnic-popup-description a {
  color: #143c76;
  text-decoration: underline;
}

.tecnic-popup-description a:hover {
  text-decoration: none;
}

.tecnic-popup-cta {
  font-size: 18px;
  font-weight: 600;
  margin-top: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  color: #393637;
}

/* Right Panel - Form */
.tecnic-popup-right {
  padding: 40px 30px;
  flex: 60%;
  background: #fff;
  border-radius: 0 10px 10px 0;
}

.tecnic-popup-form {
  height: 100%;
}

/* Form Styling */
.tecnic-popup-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.tecnic-popup-form .form-row {
  display: flex;
  gap: 15px;
}

.tecnic-popup-form p {
  margin-bottom: 1vw;
}

.tecnic-popup-form .form-row .wpcf7-form-control-wrap {
  flex: 1;
}

.tecnic-popup-form .form-row .text_center {
  text-align: center;
}
.tecnic-popup-form .wpcf7 .wpcf7-response-output {
  padding-bottom: 0;
}

.tecnic-popup-form .text_center .wpcf7-submit {
  float: unset;
  width: auto;
  height: auto;
  padding-left: 2.5vw;
  padding-right: 2.5vw;
}

.tecnic-popup-form input[type="text"],
.tecnic-popup-form input[type="email"],
.tecnic-popup-form input[type="tel"],
.tecnic-popup-form select,
.tecnic-popup-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  background: white;
  transition: border-color 0.3s ease;
  height: 3vw;
}

.tecnic-popup-form input[type="text"]:focus,
.tecnic-popup-form input[type="email"]:focus,
.tecnic-popup-form input[type="tel"]:focus,
.tecnic-popup-form select:focus,
.tecnic-popup-form textarea:focus {
  outline: none;
  border-color: #143c76;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.1);
}

.tecnic-popup-form textarea {
  resize: vertical;
  min-height: 150px;
  flex: 1;
}

/* Submit Button */
.tecnic-popup-form input[type="submit"] {
  background: linear-gradient(135deg, #2b5797 0%, #1e3a8a 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.tecnic-popup-form input[type="submit"]:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(43, 87, 151, 0.3);
}

/* Consent Text */
.tecnic-popup-consent {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 15px;
  line-height: 1.4;
}

/* Error Messages */
.tecnic-popup-form .wpcf7-not-valid-tip {
  color: #e53e3e;
  font-size: 12px;
  margin-top: 5px;
}

.tecnic-popup-form .wpcf7-validation-errors {
  background: #fee;
  border: 1px solid #fcc;
  color: #e53e3e;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

/* Success Message */
.tecnic-popup-form .wpcf7-mail-sent-ok {
  background: #e8f5e8;
  border: 1px solid #4caf50;
  color: #2e7d32;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .tecnic-popup-modal {
    flex-direction: column;
    margin: 10px;
    max-height: calc(100vh - 20px);
    padding: 25px;
  }

  .tecnic-popup-left {
    border-radius: 10px 10px 0 0;
    padding: 15px;
    padding-bottom: 0;
    min-height: auto;
  }

  .tecnic-popup-left::before {
    border-radius: 10px 10px 0 0;
  }

  .tecnic-popup-right {
    border-radius: 0 0 10px 10px;
    padding: 15px;
  }

  .tecnic-popup-left-content {
    padding: 15px;
  }

  .tecnic-popup-title {
    font-size: 18px;
    text-align: left;
    margin-bottom: 10px;
  }

  .tecnic-popup-description {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .tecnic-popup-cta {
    font-size: 15px;
    margin-top: 10px;
  }

  .tecnic-popup-form p {
    margin-bottom: 2vw;
  }

  .tecnic-popup-form .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .tecnic-popup-form .col-6:first-child {
    padding-right: 5px;
  }
  .tecnic-popup-form .col-6:last-child {
    padding-left: 5px;
  }

  .tecnic-popup-form input[type="text"],
  .tecnic-popup-form input[type="email"],
  .tecnic-popup-form input[type="tel"],
  .tecnic-popup-form select {
    height: 30px;
    padding: 0 10px;
  }

  .tecnic-popup-form textarea {
    height: 150px;
    padding: 10px;
    line-height: 1;
  }

  .tecnic-popup-form .text_center .wpcf7-submit {
    padding: 15px 4vw;
    line-height: 1;
  }

  .tecnic-popup-close {
    top: 5px;
    right: 0px;
    color: #393637;
  }
}

@media (max-width: 480px) {
  .tecnic-popup-overlay {
    padding: 10px;
  }

  .tecnic-popup-left,
  .tecnic-popup-right {
    padding: 20px 15px;
  }
}
