/**
 * ToolsBazaar - PDF Tools Stylesheet
 * Responsive, Glassmorphism, Theme-Consistent
 */

/* Dropzone & Workstation */
.pdf-workstation {
  background: var(--tb-card-bg, #ffffff);
  border: 1px solid var(--tb-border-color, #e2e8f0);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  transition: all 0.25s ease;
}

.pdf-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 0.875rem;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.pdf-dropzone:hover,
.pdf-dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-2px);
}

.pdf-dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* Multi-file Merge Card List */
.pdf-merge-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pdf-merge-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pdf-merge-card:active {
  cursor: grabbing;
}

.pdf-merge-card.dragging {
  opacity: 0.5;
  border: 2px dashed #2563eb;
}

.pdf-merge-card .file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.pdf-merge-card .file-icon {
  width: 40px;
  height: 40px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pdf-merge-card .file-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* Split PDF Options */
.split-mode-card {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.split-mode-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.split-mode-card.active {
  border-color: #2563eb;
  background: #eff6ff;
}

/* Compression Preset Badges */
.compression-preset-btn {
  border: 2px solid #e2e8f0;
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.compression-preset-btn:hover {
  border-color: #93c5fd;
}

.compression-preset-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
}

/* Savings Meter */
.savings-meter {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.savings-badge {
  font-size: 1.5rem;
  font-weight: 700;
  color: #16a34a;
}

/* PDF to JPG Thumbnail Grid */
.pdf-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.pdf-page-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.pdf-page-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.pdf-page-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f8fafc;
  padding: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.pdf-page-meta {
  padding: 0.75rem;
  margin-top: auto;
}

/* Progress bar container */
.pdf-progress-wrap {
  margin: 1.5rem 0;
}
