/* ================= MODAL BACKDROP ================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;

  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);

  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

/* ================= MODAL BOX ================= */
.modalBox {
  width: 550px;
  max-width: 95%;
  max-height: 90vh;

  background: #ffffff;
  border-radius: 18px;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* layered shadow for depth */
  box-shadow:
    0 10px 30px rgba(0,0,0,0.12),
    0 20px 60px rgba(0,0,0,0.18);

  animation: pop 0.25s ease;
}

@keyframes pop {
  from {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ================= HEADER ================= */
.modalHead {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: linear-gradient(to right, #fafafa, #ffffff);
}

.modalHead h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.modalHead .sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

/* CLOSE BUTTON */
.closeBtn {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  cursor: pointer;

  color: #64748b;
  transition: all 0.25s ease;
}

.closeBtn:hover {
  background: #f1f5f9;
  color: #111827;
  transform: rotate(90deg);
}

/* ================= BODY ================= */
.modalBody {
  padding: 22px;
  overflow-y: auto;
  flex: 1;

  background: #ffffff;
}

/* subtle scroll */
.modalBody::-webkit-scrollbar {
  width: 6px;
}
.modalBody::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 10px;
}

/* ================= FORM GRID ================= */
#editForm {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.formGroup.full {
  grid-column: span 2;
}

/* ================= FORM GROUP ================= */
.formGroup {
  display: flex;
  flex-direction: column;
}

/* ================= LABEL ================= */
.formGroup label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

/* ================= INPUT ================= */
.formGroup input,
.formGroup textarea,
.formGroup select {
  width: 100%;
  padding: 11px 13px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  font-size: 13px;
  background: #f9fafb;

  transition: all 0.2s ease;
}

/* HOVER STATE */
.formGroup input:hover,
.formGroup textarea:hover,
.formGroup select:hover {
  border-color: #cbd5f5;
  background: #fff;
}

/* FOCUS STATE */
.formGroup input:focus,
.formGroup textarea:focus,
.formGroup select:focus {
  border-color: #7c3aed;
  background: #fff;

  box-shadow:
    0 0 0 3px rgba(124,58,237,0.12),
    0 4px 12px rgba(124,58,237,0.08);
}

/* TEXTAREA */
textarea {
  resize: vertical;
  min-height: 90px;
}

/* ================= POSTER ================= */
.poster-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;

  border-radius: 12px;
  border: 1px solid #e5e7eb;

  background: #f8fafc;

  margin-bottom: 10px;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* FILE INPUT */
#edit_poster {
  width: 100%;
  padding: 12px;

  border: 1.5px dashed #d1d5db;
  border-radius: 10px;

  background: #fafafa;
  cursor: pointer;

  transition: all 0.25s ease;
}

#edit_poster:hover {
  border-color: #7c3aed;
  background: #f5f3ff;
}

/* MESSAGE */
#editPosterMsg {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

/* ================= FEE ROW ================= */
.feeRow {
  display: flex;
  gap: 12px;
}

.feeCol {
  flex: 1;
}

/* ================= FOOTER ================= */
.modalBtn {
  padding: 16px 20px;
  border-top: 1px solid #f1f5f9;

  display: flex;
  justify-content: flex-end;
  gap: 10px;

  background: linear-gradient(to right, #fafafa, #ffffff);
}

/* ================= BUTTONS ================= */
.cancel {
  padding: 10px 16px;
  border-radius: 10px;

  border: 1px solid #e5e7eb;
  background: #ffffff;

  font-size: 13px;
  cursor: pointer;

  transition: all 0.2s ease;
}

.cancel:hover {
  background: #f1f5f9;
}

/* PRIMARY BUTTON */
.create {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;

  background: linear-gradient(135deg,#7c3aed,#5b2c83);
  color: white;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  box-shadow:
    0 8px 20px rgba(124,58,237,0.25);

  transition: all 0.25s ease;
}

.create:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 25px rgba(124,58,237,0.35);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

  #editForm {
    grid-template-columns: 1fr;
  }

  .formGroup.full {
    grid-column: span 1;
  }

  .modalBox {
    width: 95%;
  }

  .feeRow {
    flex-direction: column;
  }
}