/* DocuConvert Pro - Tools UI CSS (Dropzone, Controls & Previews) */

/* Modal & Full Workspace View */
.tool-workspace {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tool-workspace.active {
  opacity: 1;
  pointer-events: all;
}

.workspace-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
}

.workspace-title-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.workspace-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #ffffff;
}

.workspace-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.workspace-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.workspace-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Drag & Drop Upload Zone */
.dropzone {
  border: 2px dashed var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.06);
  transform: scale(1.01);
}

.dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem auto;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: pulse-ring 3s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3); }
  70% { box-shadow: 0 0 0 16px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.dropzone-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.dropzone-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.file-input-hidden {
  display: none;
}

/* Selected Files Container */
.selected-files-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.file-card:hover {
  border-color: var(--border-highlight);
}

.file-details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-type-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.file-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.file-size {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.btn-remove-file {
  background: none;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-remove-file:hover {
  background: rgba(244, 63, 94, 0.15);
}

/* Page Thumbnails Preview Grid (For Image to PDF, Merge, Split) */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.thumb-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: var(--transition);
}

.thumb-card img, .thumb-card canvas {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.thumb-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-align: center;
}

/* Options Panel */
.options-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.option-input, .option-select {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.option-input:focus, .option-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Progress Section */
.progress-container {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.25s ease;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Result Card */
.result-card {
  display: none;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-emerald);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.result-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
