/* Base overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 10px; /* small padding to prevent edge clipping on mobile */
  box-sizing: border-box;
}

/* Modal */
.popup-modal {
  width: 900px;
  max-width: 100%;
  height: 560px;
  max-height: 100%;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

/* Header */
.popup-header {
  background-color: #36b2a8;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

/* Body */
.popup-body {
  display: flex;
  flex: 1;
  padding: 40px;
  justify-content: space-between;
  gap: 20px;
}

/* Image */
.popup-image img {
  width: 400px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Form */
.popup-form {
  flex: 1;
  max-width: 400px;
  margin-top: -200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popup-form h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: left;
}

.popup-form input,
.popup-form select {
  padding: 18px;
  margin-bottom: 15px;
  border: 1px solid #bce7e1;
  border-radius: 6px;
  font-size: 14px;
}

.book-btn {
  background-color: #36b2a8;
  color: white;
  padding: 18px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.emi-text {
  margin-top: 20px;
  font-size: 16px;
  color: #007a73;
  text-align: center;
}

/* ✅ Responsive Fixes */
@media (max-width: 768px) {
  .popup-modal {
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  .popup-body {
    flex-direction: column;
    padding: 20px;
    align-items: center;
  }

  .popup-image img {
    max-width: 100%;
  }

  .popup-form {
    margin-top: 0;
    max-width: 100%;
  }

  .popup-form h3 {
    font-size: 22px;
    text-align: center;
  }

  .popup-form input,
  .popup-form select {
    padding: 16px;
    font-size: 14px;
  }

  .book-btn {
    padding: 16px;
    font-size: 14px;
  }

  .emi-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .popup-header h2 {
    font-size: 18px;
  }

  .popup-close {
    font-size: 20px;
  }

  .popup-form h3 {
    font-size: 20px;
  }

  .book-btn {
    font-size: 13px;
    padding: 14px;
  }
}
