/* Drag and Drop Form Builder */
#form-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#form-elements .form-element {
  display: inline-block;
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
}

#form-canvas {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  min-height: 200px;
  background-color: #f9f9f9;
}

#form-canvas .form-element {
  margin-bottom: 10px;
}

/* Custom Modal CSS */
.custom-modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.custom-modal-content {
  background-color: #fefefe;
  margin: 15%; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  position: relative;
}

.custom-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 10px;
  top: 10px;
}

.custom-modal-close:hover,
.custom-modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#attribute-list label {
  display: block;
  margin-bottom: 10px;
}

#attribute-list input {
  width: 100%;
}

/* Preview Form */
.ecf-preview-form-content {
  width: 30%;
  margin-top: 2rem;
}

.ecf-preview-form .ecf-form-group {
  margin-bottom: 20px;
}

.ecf-preview-form input[type="text"],
.ecf-preview-form input[type="email"],
.ecf-preview-form input[type="password"],
.ecf-preview-form input[type="number"],
.ecf-preview-form input[type="url"],
.ecf-preview-form input[type="tel"],
.ecf-preview-form textarea,
.ecf-preview-form input[type="checkbox"],
.ecf-preview-form input[type="radio"],
.ecf-preview-form select,
.ecf-preview-form input[type="date"],
.ecf-preview-form input[type="time"],
.ecf-preview-form input[type="color"],
.ecf-preview-form input[type="range"],
.ecf-preview-form input[type="file"],
.ecf-preview-form input[type="submit"],
.ecf-preview-form input[type="hidden"],
.ecf-preview-form input[type="range"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ecf-preview-form input[type="submit"] {
  width: auto;
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  cursor: pointer;
}

.ecf-preview-form input[type="submit"]:hover {
  background-color: #0056b3;
  border-color: #004085;
}

.ecf-preview-form input[type="checkbox"],
.ecf-preview-form input[type="radio"] {
  display: inline-block;
  width: auto;
}
