/* upload_modals.css */

/* ─── Overlay + content wrapper ───────────────────────────────────── */
.modal-upload {
  display: none;
  position: fixed;
  inset: 0;              /* top/right/bottom/left = 0 */
  z-index: 1000;
  background-color: rgba(0,0,0,0.5);
  overflow: auto;
}
.modal-upload .modal-content-upload {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px 30px;
  border-radius: 10px;
  max-width: 500px;
  position: relative;
}

/* ─── Close button ───────────────────────────────────────────────── */
.modal-upload .close-button-upload {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  background: none;
  border: none;
}
.modal-upload .close-button-upload:hover,
.modal-upload .close-button-upload:focus {
  color: #000;
}

/* ─── Status Container ───────────────────────────────────────────── */
.modal-upload .form-container-upload {
  background-color: #fff;
  padding: 15px;
  margin-top: 5px;
  border-radius: 10px;
  width: 100%;
  text-align: center;
}

/* Progress bar wrapper (hidden until JS toggles it) */
.modal-upload #progress-container {
  display: none;
  width: 100%;
  background-color: #f3f3f3;
  border: 1px solid #ccc;
  margin-top: 20px;
}
/* The actual bar */
.modal-upload #progress-bar {
  height: 20px;
  width: 0%;
  background-color: #4caf50;
  text-align: center;
  line-height: 20px;
  color: white;
}

/* Textual status updates */
.modal-upload #upload-status {
  margin-top: 10px;
  font-weight: bold;
}

/* Spinner + message (hidden until JS toggles it) */
.modal-upload #processing-spinner {
  display: none;
  margin-top: 20px;
  text-align: center;
}
.modal-upload #processing-spinner .spinner {
  border: 16px solid #f3f3f3;
  border-top: 16px solid #333;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  animation: spin 2s linear infinite;
  margin: 0 auto;
}
.modal-upload #processing-spinner p {
  margin-top: 20px;
  font-size: 1.2em;
  color: red;
}

/* Spinner keyframes */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─── Responsive tweaks ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .modal-upload .modal-content-upload {
    margin: 20% auto;
    width: 90%;
  }
}

