/* File drop zone */
.drop-zone {
  border: 2px dashed #cfe0f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragging {
  border-color: #0078d4;
  background: #eef6ff;
}
.drop-icon { font-size: 30px; line-height: 1; }
.drop-text { margin-top: 10px; font-size: 15px; color: #333; font-weight: 600; }
.drop-link { color: #0078d4; text-decoration: underline; }
.drop-note { margin-top: 6px; font-size: 12px; color: #999; }

/* Image list (page order) */
.file-list { margin-top: 14px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fafafa;
  margin-bottom: 8px;
}
.file-idx {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0078d4;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #fff;
}
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-size: 13px;
  color: #1a1a1a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { font-size: 11px; color: #888; }
.file-ctrl { flex-shrink: 0; display: flex; gap: 4px; }
.file-ctrl button {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.file-ctrl button:hover:not(:disabled) { background: #f0f6ff; border-color: #0078d4; color: #0078d4; }
.file-ctrl button:disabled { opacity: 0.35; cursor: default; }
.file-ctrl .rm:hover { background: #fdecea; border-color: #e74c3c; color: #e74c3c; }

/* Options */
.opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.opt-row label { font-size: 13px; color: #555; }
#page-size {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  outline: none;
}
#page-size:focus { border-color: #0078d4; }

/* Action */
.btn-merge {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-merge:hover:not(:disabled) { background: #005fa3; }
.btn-merge:disabled { opacity: 0.6; cursor: default; }

.pdf-status {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  word-break: break-word;
}
.pdf-status.error { background: #fdecea; border: 1px solid #f5c6c0; color: #c0392b; }
.pdf-status.ok { background: #eaf7ea; border: 1px solid #b6e0b6; color: #107c10; }

.result-box {
  display: none;
  margin-top: 14px;
  background: #f0f6ff;
  border: 1px solid #c5ddf9;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.result-box.show { display: block; }
.btn-download {
  display: inline-block;
  padding: 11px 22px;
  background: #fff;
  color: #0078d4;
  border: 1px solid #0078d4;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-download:hover { background: #e8f2fc; }
