/* === Modal Wrapper === */
.modal {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  transition: opacity 0.3s ease-in-out;
}

/* === Hidden state === */
.modal.hidden {
  display: none;
}

/* === Modal Box === */
.modal-content {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
}

/* === Modal Close Button === */
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* === Form Fields === */
.modal-content input[type="text"],
.modal-content input[type="file"],
.modal-content input[type="email"],
.modal-content input[type="number"],
.modal-content input[type="url"],
.modal-content textarea {
  width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* === Buttons === */
.btn-green {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.btn-green:hover {
  background-color: #218838;
}

/* === Responsive Category List in Modal === */
#category-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* === Responsive Adjustments === */
@media (max-width: 480px) {
  .modal-content {
    max-width: 100%;
    padding: 1rem;
  }

  .modal-close {
    font-size: 1.2rem;
    right: 10px;
    top: 8px;
  }

  .btn-green {
    width: 100%;
  }
}