/* Tools — Image to PDF Compiler (shared bg with PDF Unlocker pattern) */

.tools-image-pdf-page {
  min-height: 100vh;
}

.tools-image-pdf-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.78) 0%, rgba(8, 8, 8, 0.88) 45%, rgba(5, 5, 5, 0.92) 100%),
    url('/assets/backgrounds/cover-photo.png') center / cover no-repeat fixed;
}

.site-header--tools {
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tools-image-pdf-main {
  padding-top: calc(var(--header-height) + 2.5rem);
  padding-bottom: 4rem;
}

.tools-image-pdf-container {
  max-width: 960px;
}

.tools-image-pdf-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tools-image-pdf-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 0.65rem;
}

.tools-image-pdf-title {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.tools-image-pdf-subtitle {
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto;
}

.tools-image-pdf-status {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.45);
}

.tools-image-pdf-status--error {
  border-color: rgba(214, 0, 0, 0.35);
  color: #f0b0b0;
}

.tools-image-pdf-status--success {
  border-color: rgba(80, 180, 120, 0.35);
  color: #b8e6c8;
}

.tools-image-pdf-status--info {
  color: var(--text-silver);
}

.tools-image-pdf-card {
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.tools-image-pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tools-image-pdf-count {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.tools-image-pdf-count strong {
  color: var(--text-white);
}

.image-upload-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-bottom: 1.5rem;
}

.image-upload-dropzone:hover,
.image-upload-dropzone:focus-visible,
.image-upload-dropzone.is-dragover {
  border-color: rgba(214, 0, 0, 0.45);
  background: rgba(214, 0, 0, 0.06);
  outline: none;
}

.image-upload-dropzone__title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.image-upload-dropzone__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.image-editor {
  margin-bottom: 1.5rem;
}

.image-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.image-editor__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.image-editor__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.image-editor__list {
  display: grid;
  gap: 0.75rem;
}

.image-editor__empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border-subtle);
  border-radius: 2px;
}

.image-editor-item {
  display: grid;
  grid-template-columns: auto 72px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  cursor: grab;
}

.image-editor-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.image-editor-item.is-dragover {
  border-color: var(--accent-red);
  box-shadow: inset 0 0 0 1px rgba(214, 0, 0, 0.25);
}

.image-editor-item__index {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-red);
}

.image-editor-item__thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.image-editor-item__meta {
  min-width: 0;
}

.image-editor-item__name {
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-all;
  margin-bottom: 0.2rem;
}

.image-editor-item__size {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.image-editor-item__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.image-editor-item__actions .btn {
  min-width: 2.5rem;
  padding: 0.35rem 0.55rem;
}

@media (max-width: 768px) {
  .tools-image-pdf-card {
    padding: 1.25rem;
  }

  .image-editor-item {
    grid-template-columns: auto 64px 1fr;
    grid-template-areas:
      'index thumb meta'
      'actions actions actions';
  }

  .image-editor-item__index { grid-area: index; }
  .image-editor-item__thumb { grid-area: thumb; width: 64px; height: 48px; }
  .image-editor-item__meta { grid-area: meta; }
  .image-editor-item__actions {
    grid-area: actions;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tools-image-pdf-card .form-actions {
    flex-direction: column;
  }

  .tools-image-pdf-card .form-actions .btn {
    width: 100%;
  }
}
