.modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
}

/* Add a new wrapper inside modal to handle stacking */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  overflow-y: auto;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin: auto;
  padding: 2.5rem;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  color: #fff;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s ease;
}

.close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: rotate(90deg);
}

/* Form styling enhancements */
.modal .form-group {
  margin-bottom: 1.5rem;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.2s ease;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.modal label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #fff;
}

/* Add placeholder styling */
.modal input::placeholder,
.modal select::placeholder,
.modal textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Style select dropdown */
.modal select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.modal select option {
  background-color: #1a1a1a;
  color: #fff;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .modal-content {
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
    padding: 2rem;
  }
} 