/* Core Styles */
.estimator-group.required {
  color: red;
}
.estimator-group.error-field {
  border: 2px solid red;
}
.estimator-group.error-label {
  color: red;
}

.mvp-estimator-wrapper {
  width: 100%;
  margin: 0 auto;
  font-family: "Poppins", sans-serif;
  background: #fff;
  padding: 30px;
}
#aepro-form {
  width: 50%;
  margin: 0 auto;
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #002f87;
}
input, select {
  width: 100%;
  margin-top: 4px;
  padding: 6px;
}
button {
  background: #002f87;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Container and Heading */
.mvp-calculator-container {
  max-width: 600px;
  margin: 50px auto;
  font-family: 'Segoe UI', sans-serif;
  color: #1d1d1f;
}
.mvp-calculator-container h2 {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: #002060;
  margin-bottom: 40px;
}
.mvp-calculator-container label,
.mvp-calculator-container .section-title {
  font-weight: 600;
  margin: 20px 0 10px;
  display: block;
  font-size: 16px;
}

/* Select + Slider */
.mvp-calculator-container select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 25px;
}
input[type=range] {
  width: 100%;
  margin: 10px 0;
  -webkit-appearance: none;
  height: 10px;
  border-radius: 5px;
  background: #e0e0e0;
}
input[type=range]::-webkit-slider-thumb,
input[type=range]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #002f87;
  cursor: pointer;
}
.slider-value {
  margin-top: 10px;
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.radio-group label {
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  gap: 10px !important;
}
.radio-group input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #002f87;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  position: relative;
}
.radio-group input[type="radio"]:checked::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background-color: #002f87;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Group Titles */
.estimator-title {
  color: #002f87;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
#sub-heading {
  font-size: 16px;
  margin-bottom: 20px;
  color: #002f87;
  text-align: center;
}
.estimator-group {
  margin-bottom: 32px;
}
.estimator-group h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #002f87;
  margin-bottom: 8px;
}
.estimator-subtitle {
  margin-bottom: 16px;
  color: #666;
  font-size: 0.95rem;
}
.card-select select,
.estimator-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background-color: #fff;
}
.card-select select:hover,
.card-select select:focus {
  border-color: #002f87;
  box-shadow: 0 0 0 2px rgba(0, 47, 135, 0.15);
}
.estimator-button {
  margin-top: 24px;
  text-align: left;
}
#view-quote-btn {
  background-color: #002f87;
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
#view-quote-btn:hover {
  background-color: #0140b8;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff;
  margin: 8% auto;
  padding: 30px 40px;
  border-radius: 12px;
  max-width: 65%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeInScale 0.3s ease forwards;
  overflow-x: auto;
}
.modal-content h3 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #002f87;
  text-align: center;
  border-bottom: 2px solid #002f87;
  padding-bottom: 8px;
}
.modal-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  background-color: #fafafa;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  min-width: 450px;
}
.modal-content table thead tr {
  background-color: #002f87;
  color: white;
  font-weight: 600;
}
.modal-content table thead th {
  padding: 12px 15px;
}
.modal-content table tbody tr {
  background-color: #fff;
  transition: background-color 0.25s ease;
}
.modal-content table tbody tr:hover {
  background-color: #f1f9f1;
}
.modal-content table tbody td {
  padding: 14px 15px;
}
.modal-content table tbody tr.total-row {
  font-weight: 700;
  background-color: #e6f4ea;
  border-top: 2px solid #002f87;
}
.modal-content table tbody tr.total-row td:first-child {
  text-align: right;
}
.close {
  position: absolute;
  top: 18px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  color: #888;
  cursor: pointer;
}
.close:hover {
  color: #000;
}
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Fixes */
@media (max-width: 768px) {
  #aepro-form {
    width: 100%;
    padding: 10px;
  }
  .mvp-estimator-wrapper {
    padding: 20px;
  }
  label {
    font-size: 1rem;
  }
  input, select {
    font-size: 1rem;
    padding: 8px;
  }
  .estimator-title {
    font-size: 1.2rem;
  }
  #sub-heading {
    font-size: 14px;
  }
  button, #view-quote-btn {
    font-size: 1rem;
    padding: 10px 16px;
    width: 100%;
  }
  .radio-group {
    flex-direction: column;
    gap: 12px;
  }
  .modal-content {
    width: 95%;
    padding: 20px 15px;
    max-width: none;
  }
  .modal-content h3 {
    font-size: 1.4rem;
  }
  .modal-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    background-color: #fafafa;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    min-width: auto;
  }
  .modal-content table thead tr {
    background-color: #002f87;
    color: white;
    font-weight: 600;
  }
  .modal-content table thead th {
    padding: 12px 15px;
  }
  .modal-content table tbody tr {
    background-color: #fff;
    transition: background-color 0.25s ease;
  }
  .modal-content table tbody tr:hover {
    background-color: #f1f9f1;
  }
  .modal-content table tbody td {
    padding: 14px 15px;
  }
  .modal-content table tbody tr.total-row {
    font-weight: 700;
    background-color: #e6f4ea;
    border-top: 2px solid #002f87;
  }
  .modal-content table tbody tr.total-row td:first-child {
    text-align: right;
  }
  .close {
    font-size: 22px;
    top: 10px;
    right: 10px;
  }
}
