/* ----------  PDF Creator — tool-specific styles  ---------- */

/* Shared chrome (.tool-page, .panel, .field, .toast, etc.) lives in
   assets/css/main.css so every tool inherits the same look. */

/* ----------  Dropzone  ---------- */

.dropzone {
  position: relative;
  display: block;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
  outline: none;
  margin-bottom: 22px;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background: var(--bg-elev-2);
}

.dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.08);
  transform: scale(1.005);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(34, 211, 238, 0.15));
  color: #cdd3ff;
  border: 1px solid rgba(124, 92, 255, 0.3);
}
.dropzone-icon svg { width: 26px; height: 26px; }

.dropzone-text { color: var(--text); font-size: 15px; }
.dropzone-text strong { color: var(--text); }
.dropzone-hint { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ----------  Image list  ---------- */

.images-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.images-header h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.muted { color: var(--text-dim); font-weight: 500; }
.hint  { color: var(--text-dim); font-size: 12px; }

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.image-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: grab;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease,
    opacity 0.15s ease;
}
.image-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.image-card.dragging { opacity: 0.4; cursor: grabbing; }
.image-card.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.35); }

.image-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #0e1117;
}

.image-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-muted);
  gap: 6px;
}
.image-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.image-index {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11, 13, 18, 0.85);
  color: white;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(11, 13, 18, 0.85);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
  backdrop-filter: blur(6px);
}
.image-card:hover .image-remove,
.image-card:focus-within .image-remove { opacity: 1; }
.image-remove:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fda4a4;
  border-color: rgba(239, 68, 68, 0.5);
}
.image-remove svg { width: 14px; height: 14px; }
