/* Modal container */
.modalx {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  font-family: 'Poppins', sans-serif;
  animation: fadeIn 0.3s;
}

#previewImage{
    display:none; width:100%; max-width:300px; margin-top:10px; margin-bottom:10px; border:1px solid #ccc; border-radius:8px;
}

/* Modal content box */
.modalx-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  position: relative;
  animation: slideDown 0.4s ease-out;
}

/* Close button */
.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

/* Heading */
.modalx-content h2 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

/* Form inputs, textarea, select styling */
form#formPasien input[type="text"],
form#formPasien input[type="number"],
form#formPasien textarea,
form#formPasien select,
form#formPasien input[type="file"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

#telepon,
#tombol-foto {
  margin-top: -6px;
}

/* Image preview */
#preview {
  max-width: 100%;
  display: none;
  border-radius: 10px;
  margin-bottom: 10px;
}

.modalx-content textarea {
  margin-bottom: -10px;
}

/* Submit button */
form#formPasien button[type="submit"] {
  padding: 10px 20px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
}

/* Submit button hover effect */
form#formPasien button[type="submit"]:hover {
  background-color: #276127;
}

/* Animasi fade in background */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Animasi slide down modal content */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {

.modalx-content{
    margin-top:100px;
}

.modalx-content h2 {
  font-size: 1rem;
}


}

