/* Modern Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  /* Dark layout */
  backdrop-filter: blur(5px);
  /* Modern blur effect */
}

.modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 40px;
  border: none;
  border-radius: 12px;
  width: 90%;
  max-width: 800px; /* Erhöht für bessere Lesbarkeit auf Desktop */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
}

/* Anpassung auf Mobile-Geräten für padding */
@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    margin: 10% auto;
  }
}

/* Header */
.modal-header h2 {
  margin-top: 0;
  color: #333;
  font-size: 24px;
  font-weight: 700;
}

.modal-header p {
  color: #666;
  font-size: 14px;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* Close Button */
.close-modal {
  color: #aaa;
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
  color: #000;
  text-decoration: none;
}

/* Form Elements */
.form-group {
  margin-bottom: 15px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-group.half {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group label .required {
  color: #e2401c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  background-color: #fafafa;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus {
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
  background-color: #fff;
  outline: none;
}

/* Submit Button */
.button-primary-modal {
  width: 100%;
  padding: 15px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-top: 10px;
  border-radius: 6px !important;
  background-color: #333 !important;
  /* Premium Dark */
  color: white !important;
  border: none !important;
  transition: background-color 0.2s transform 0.1s !important;
  cursor: pointer;
}

.button-primary-modal:hover {
  background-color: #000 !important;
  transform: translateY(-1px);
}

.button-primary-modal:active {
  transform: translateY(0);
}

/* Animation */
.fx-fade-in {
  animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fix for Button Width matching Checkout Button */
#wc-instant-offer-btn {
  /* display: inline-block; REMOVED (Ignored due to float) */
  display: block;
  width: auto;

  /* User Provided Computed Styles */
  font-family: inherit; /* "Open Sans", sans-serif in theme */
  font-weight: 600;
  font-size: 14px;
  line-height: normal;
  text-align: center;
  text-decoration: none !important;
  text-transform: none;

  padding: 10px 12px;
  border-radius: 5px;
  border: none !important;

  background-color: rgb(4, 156, 227) !important;
  color: rgb(255, 255, 255) !important;

  cursor: pointer;
  box-sizing: border-box;

  /* Positioning (Keep relative to other buttons) */
  float: right;
  margin-left: 15px;
  margin-top: 0;
  margin-bottom: 0;
  height: auto; /* Let padding define height, or force 39px if needed but auto is safer */
}

#wc-instant-offer-btn:hover {
  /* Slightly darker shade for hover */
  background-color: rgb(3, 128, 187) !important;
  color: rgb(255, 255, 255) !important;
  text-decoration: none !important;
}

/* Fix for Modal Submit Button (Black) */
#wc-instant-offer-submit {
  background-color: #131313 !important;
  color: #ffffff !important;
  border: none !important;
  transition: background 0.3s;
}

#wc-instant-offer-submit:hover,
#wc-instant-offer-submit:focus {
  background-color: #333333 !important;
  color: #ffffff !important;
}
