/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: flex-start; /* align to top */
  align-items: flex-start;
  z-index: 9999;
  overflow-y: auto; /* allow scroll */
}

/* Dialog */
.dialog {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 90%;
  max-width: 900px;   /* wide on desktop */
  margin: 0 auto;     /* center horizontally */
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: slideDown 0.25s ease;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
  color: #666;
  border: none;
  background: none;
}
.close-btn:hover {
  color: #000;
}

/* Heading */
.dialog h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  color: #222;
  text-align: left;
}

/* Form */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}
.form-group label {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Submit button */
.btn-submit {
  background: #007bff;
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-size: 17px;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-submit:hover {
  background: #0056b3;
}
.btn-submit:active {
  background: #004494;
}

/* Mobile: stacked full-width */
@media (max-width: 600px) {
  .dialog {
    width: 100%;
    border-radius: 0;
    min-height: 100vh; /* fill screen */
    margin: 0;
    padding: 20px;
    box-shadow: none;
  }
  .dialog h2 {
    font-size: 20px;
    text-align: center;
  }
}

/* Animation */
@keyframes slideDown {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}
