/* Modal backdrop */
#dsServiceModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-in-out;
}

/* Modal content container */
#dsServiceModal > div.modal-content {
  background-color: white;
  border-radius: 0.5rem; /* Tailwind: rounded-lg */
  width: 95vw;
  max-width: 800px; /* Limit width on larger screens */
  max-height: 90vh; /* Limit height to allow scrolling */
  position: relative;
  padding: 0.25rem; /* Tailwind: p-5 */
  transition: opacity 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

/* Modal body (scrollable content) */
#generalModalBody {
  overflow-y: auto; /* Enable vertical scrolling */
  flex: 1; /* Take remaining space */
  max-height: 80vh; /* Ensure scrolling within modal */
  padding: 1rem; /* Tailwind: p-4 */
}

/* Close button */
.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* Modal title */
.modal-title {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600; /* Tailwind: font-semibold */
}

/* Spinner */
.modal-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #dsServiceModal > div.modal-content {
    width: 100vw;
    max-width: none;
    border-radius: 0;
    height: 100vh;
    max-height: none;
  }
  #generalModalBody {
    max-height: none; /* Full height on small screens */
  }
}

/* Spinner animation */
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}