.hidden {
  display: none !important;
}

.btn {
  border: none;
}

/* ── Upload modal overlay ────────────────────────────────────────────────── */
.upload-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;   /* above footer's 1000 */
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay 0.18s ease;
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Upload modal card ───────────────────────────────────────────────────── */
.upload-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 420px;
  padding: 26px 26px 20px;
  animation: slideUpModal 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUpModal {
  from { transform: translateY(22px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.upload-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin: 0;
}
.upload-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.upload-modal-close:hover {
  color: #333;
  background: #f3f3f3;
}

/* Drop zone */
.upload-dropzone {
  border: 2px dashed #d0d5dd;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  margin-bottom: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: #2dc997;
  background: #f0fdf8;
}
.upload-dropzone.drag-over { border-style: solid; }
.upload-dropzone-icon {
  color: #bbb;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.upload-dropzone:hover .upload-dropzone-icon,
.upload-dropzone.drag-over .upload-dropzone-icon { color: #2dc997; }
.upload-dropzone-label {
  font-size: 13.5px;
  color: #555;
  font-weight: 500;
  margin: 0 0 4px;
}
.upload-size-limit {
  font-size: 11.5px;
  color: #999;
  margin: 0;
}

/* File info strip */
.upload-file-info {
  background: #f5f7fa;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
}
.upload-file-info-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-file-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.upload-file-name {
  font-size: 13px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-file-size {
  font-size: 11px;
  color: #888;
}
.upload-file-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.15s;
}
.upload-file-clear:hover { color: #e74c3c; }

/* Image compression toggle */
.upload-image-options { margin-bottom: 14px; }
.upload-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 400 !important;
  color: #444;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0 !important;
}
.upload-checkbox-label input[type="checkbox"] { display: none; }
.upload-checkbox-custom {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: border-color 0.15s, background 0.15s;
}
.upload-checkbox-label input[type="checkbox"]:checked + .upload-checkbox-custom {
  background: #2dc997;
  border-color: #2dc997;
}
.upload-checkbox-label input[type="checkbox"]:checked + .upload-checkbox-custom::after {
  content: '';
  display: block;
  width: 4px;
  height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Status message */
.upload-status {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  text-align: center;
}
.upload-status.success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.upload-status.error   { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }
.upload-status.info    { background:#e8f4fd; color:#0c5460; border:1px solid #bee5eb; }

/* Progress */
.upload-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.upload-progress-bar {
  flex: 1;
  height: 6px;
  background: #e8e8e8;
  border-radius: 999px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2dc997, #1aab7a);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.upload-progress-pct {
  font-size: 12px;
  color: #666;
  width: 32px;
  text-align: right;
}

/* Action buttons */
.upload-actions { display: flex; gap: 10px; }
.upload-actions .btn {
  flex: 1;
  margin-bottom: 0;
  padding: 10px 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.upload-cancel-btn { background: #f3f4f6; color: #444; }
.upload-cancel-btn:hover { background: #e5e7eb; box-shadow: none; transform: none; }
.upload-submit-btn { background: #2dc997; }
.upload-submit-btn:disabled {
  background: #a8e6d4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}