/* ===== Base Styles ===== */
body {
  font-family: Arial, sans-serif;
  color: #333;
  background-color: #f9fafb;
  margin: 0;
  padding: 0;
}

/* ===== Wrapper ===== */
.mvp-timeline-wrapper {
  width: 100%;
  margin: 0 auto;
  font-family: "Poppins", sans-serif;
  background: #fff;
  padding: 30px;
}

#mvp-timeline {
  width: 50%;
  margin: 0 auto;
}

/* ===== Estimator Form ===== */
#mvpte-estimator {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  text-align: left;
}

#mvpte-estimator label,
#mvpte-estimator select,
#mvpte-estimator button {
  font-size: 1rem;
}

#mvpte-estimate-btn {
  background-color: #002f87;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 10px;
  width: 40%;
}

#mvpte-estimate-btn:hover {
  background-color: #0140b8;
}

/* ===== Modal Styles ===== */
.mvpte-modal {
  display: none;
  position: fixed;
  z-index: 2999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow: auto;
}

.mvpte-modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: fadeInScale 0.3s ease forwards;
}

.mvpte-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease;
}

.mvpte-close:hover {
  color: #000;
}

.mvpte-modal-content h3 {
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 1.8rem;
  color: #002f87;
  border-bottom: 2px solid #002f87;
  padding-bottom: 8px;
  text-align: center;
}

/* ===== Table Styles ===== */
.mvpte-modal-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  background-color: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  font-size: 1rem;
  color: #333;
  min-width: 450px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.mvpte-modal-content thead tr {
  background-color: #002f87;
  color: white;
  font-weight: 600;
  text-align: left;
}

.mvpte-modal-content thead th {
  padding: 12px 15px;
  width: 13%;
}

.mvpte-modal-content tbody tr {
  background-color: #fff;
  transition: background-color 0.25s ease;
}

.mvpte-modal-content tbody tr:hover {
  background-color: #f1f9f1;
}

.mvpte-modal-content tbody td {
  padding: 14px 15px;
  vertical-align: middle;
}

.mvpte-modal-content tbody tr.total-row {
  font-weight: 700;
  background-color: #e6f4ea;
  border-top: 2px solid #002f87;
}

.mvpte-modal-content tbody tr.total-row td:first-child {
  text-align: right;
  padding-right: 10px;
}

/* ===== Animation ===== */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Responsive Fixes ===== */
@media (max-width: 768px) {
  #mvp-timeline {
    width: 100%;
  }

  #mvpte-estimator {
    max-width: 100%;
    padding: 0 10px;
  }

  #mvpte-estimate-btn {
    width: 100%;
  }

  .mvpte-modal-content {
    max-width: 95%;
    margin: 15% auto;
    padding: 20px 20px;
  }

  .mvpte-modal-content h3 {
    font-size: 1.5rem;
  }

  .mvpte-modal-content table {
    display: block;
    overflow-x: auto;
    font-size: 0.9rem;
    min-width: unset;
  }

  .mvpte-modal-content table thead th,
  .mvpte-modal-content table tbody td {
    padding: 10px 8px;
  }

  .mvpte-close {
    top: 12px;
    right: 15px;
    font-size: 24px;
  }
}

@media (max-width: 400px) {
  .mvpte-modal-content {
    padding: 15px;
    margin: 20% auto;
  }

  .mvpte-modal-content h3 {
    font-size: 1.3rem;
  }

  .mvpte-modal-content table {
    font-size: 0.85rem;
  }
}
