/* Image to PDF — Tool-specific styles */

.page { padding: 40px 20px; max-width: 1000px; margin: 0 auto; }
.page h1 { font-size: 26px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.page .subtitle { color: #888; margin-bottom: 20px; font-size: 14px; }

/* Upload */
.upload-area {
  border: 2px dashed #333; border-radius: 12px;
  text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover { border-color: #555; background: #0d0d0d; }
.upload-area.dragover { border-color: #ff4444; background: #1a0000; }
.upload-content { padding: 48px 20px; }
.upload-icon { width: 40px; height: 40px; color: #444; margin-bottom: 12px; }
.upload-content p { color: #666; font-size: 14px; margin-bottom: 4px; }
.upload-link { color: #ff4444; cursor: pointer; }
.upload-hint { font-size: 12px; color: #444; }

/* Options */
.options-card { margin-top: 16px; }
.opt-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.opt-group { flex: 1; min-width: 200px; }
.opt-label {
  display: block; font-size: 13px; color: #aaa;
  margin-bottom: 8px; font-weight: 500;
}
.opt-group select {
  width: 100%; padding: 8px 10px;
  background: #161616; color: #eee;
  border: 1px solid #2a2a2a; border-radius: 6px;
  font-size: 13px;
}
.toggle-row { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle { cursor: pointer; }
.toggle input { display: none; }
.toggle span {
  display: inline-block; padding: 7px 14px;
  background: #161616; border: 1px solid #2a2a2a; border-radius: 6px;
  color: #aaa; font-size: 13px; transition: all 0.15s;
}
.toggle input:checked + span {
  background: #2a0a0a; border-color: #ff4444; color: #fff;
}

/* Image card list */
.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.img-card {
  position: relative;
  background: #0d0d0d; border: 1px solid #2a2a2a; border-radius: 8px;
  padding: 8px; cursor: grab;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.img-card:hover { border-color: #444; }
.img-card.dragging { opacity: 0.4; cursor: grabbing; }
.img-card.drag-over { border-color: #ff4444; transform: scale(1.02); }
.img-card-thumb {
  width: 100%; aspect-ratio: 3/4;
  background: #1a1a1a; border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.img-card-thumb img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}
.img-card-meta {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11px;
}
.img-card-idx {
  display: inline-block; background: #2a0a0a; color: #fff;
  font-weight: 600; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; align-self: flex-start;
}
.img-card-name { color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-card-dim { color: #666; }
.img-card-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.7); color: #fff;
  border: 1px solid #444; border-radius: 50%;
  font-size: 14px; line-height: 18px;
  cursor: pointer; padding: 0;
}
.img-card-remove:hover { background: #ff4444; border-color: #ff4444; }

/* Action row */
.action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-msg { font-size: 13px; margin-left: 8px; }
.status-msg.ok { color: #4caf50; }
.status-msg.err { color: #ff6666; }

@media (max-width: 600px) {
  .page { padding: 24px 12px; }
  .page h1 { font-size: 22px; }
  .opt-row { flex-direction: column; gap: 16px; }
}
