.image-to-pdf-container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
  border: 1px solid #ccc;
  background: #fff;
  font-family: Arial, sans-serif;
}

.image-to-pdf-container h2 {
  margin-bottom: 15px;
}

#image-upload {
  margin-bottom: 10px;
}

.fit-toggle {
  margin-bottom: 10px;
}

.dropzone {
  border: 2px dashed #aaa;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: #fefefe;
  min-height: 150px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.dropzone.dragover {
  background: #e6f7ff;
  border-color: #00aaff;
}

#dropzone p#dropzone-text {
  width: 100%;
  color: #666;
  margin: 0;
  /*font-weight: normal;*/
}

.image-box {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  padding: 5px;
  cursor: move;
  transition: box-shadow 0.2s;
}

.image-box:hover {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.image-box img {
  display: block;
  max-width: 120px;
  max-height: 120px;
  border-radius: 4px;
}

/* 🗑️ Trash icon (Bootstrap) */
.image-box .remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(245, 39, 54, 0.8);
  color: white;
  border-radius: 50%;
  padding: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.image-box .remove:hover {
  background: #000;
}

/* 📏 File size badge */
.image-box .file-size {
  position: absolute;
  top: 4px;
  left: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 3px;
  display: none;
  z-index: 2;
}

.image-box:hover .file-size {
  display: block;
}

/* 📄 Filename below image */
.filename {
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
  margin-top: 4px;
  max-width: 110px;
  word-break: break-word;
  color: #444;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#generate-pdf {
  padding: 10px 20px;
  background: #0073aa;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 10px;
}

#generate-pdf:hover {
  background: #005d8f;
}

.sortable-ghost {
  opacity: 0.4;
}

.preview-loader {
  display: none;
  font-weight: bold;
  text-align: center;
  padding: 1rem;
  color: #555;
  font-size: 16px;
}
