/* ==========================================================================
   I WANT PDF — TOOL WORKSPACES & INTERACTION STYLESHEET
   Brand: I Want PDF | Modern Tool Workspaces
   ========================================================================== */

.tool-workspace-header {
  text-align: center;
  padding: 44px 0 28px;
}

.tool-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.tool-breadcrumbs a:hover {
  color: var(--brand-blue);
}

.tool-badge-large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 30px;
  margin: 0 auto 16px;
}

.tool-workspace-header h1 {
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--brand-navy);
  margin-bottom: 8px;
}

.tool-workspace-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Workspace Canvas */
.workspace-wrapper {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 20px auto 48px;
  padding: 36px 30px;
  position: relative;
  min-height: 380px;
}

/* Step 1: Upload Dropzone */
.tool-dropzone {
  border: 2.5px dashed rgba(38, 120, 255, 0.35);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-dropzone:hover, .tool-dropzone.drag-active {
  background: rgba(38, 120, 255, 0.04);
  border-color: var(--brand-blue);
}

.dropzone-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(38, 120, 255, 0.12);
  color: var(--brand-blue);
  display: grid;
  place-items: center;
  font-size: 34px;
  margin: 0 auto 16px;
}

.tool-dropzone h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.tool-dropzone p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.supported-formats-text {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 14px;
}

/* Step 2: Interactive Files Grid & Reorder */
.workspace-active-stage {
  display: none;
}

.workspace-active-stage.visible {
  display: block;
}

.files-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.file-preview-card {
  position: relative;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all var(--transition-fast);
}

.file-preview-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.file-thumbnail-box {
  width: 100%;
  height: 140px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.file-thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-doc-icon {
  font-size: 36px;
  color: var(--brand-red);
}

.file-meta-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-bottom: 4px;
}

.file-meta-size {
  font-size: 11px;
  color: var(--text-light);
}

.card-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(241, 73, 101, 0.1);
  color: var(--brand-red);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  transition: all var(--transition-fast);
}

.card-remove-btn:hover {
  background: var(--brand-red);
  color: #ffffff;
}

.card-rotate-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(38, 120, 255, 0.1);
  color: var(--brand-blue);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.card-rotate-btn:hover {
  background: var(--brand-blue);
  color: #ffffff;
}

/* Tool Options Panel */
.tool-options-panel {
  background: var(--surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}

.options-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.option-radio-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface-primary);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all var(--transition-fast);
}

.option-radio-card:hover {
  border-color: rgba(38, 120, 255, 0.4);
}

.option-radio-card.selected {
  border-color: var(--brand-blue);
  background: rgba(38, 120, 255, 0.04);
}

.option-radio-card input[type="radio"] {
  margin-top: 3px;
}

.option-label-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.option-label-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.form-group-custom {
  margin-bottom: 14px;
}

.form-label-custom {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input-custom {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface-primary);
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input-custom:focus {
  border-color: var(--brand-blue);
}

/* Action Trigger Bar */
.workspace-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.more-files-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border-light);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Step 3: Processing Overlay */
.processing-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 30px;
}

[data-theme="dark"] .processing-modal {
  background: rgba(13, 23, 43, 0.95);
}

.processing-modal.active {
  display: flex;
}

.progress-spinner-ring {
  width: 70px;
  height: 70px;
  border: 5px solid var(--surface-muted);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-modal h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 6px;
}

.processing-modal p {
  font-size: 14px;
  color: var(--text-muted);
}

.progress-bar-container {
  width: min(320px, 90%);
  height: 8px;
  background: var(--surface-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 18px;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--brand-gradient);
  transition: width 0.3s ease;
}

/* Step 4: Download / Result Screen */
.result-screen {
  display: none;
  text-align: center;
  padding: 30px 16px;
}

.result-screen.visible {
  display: block;
}

.result-check-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(33, 191, 131, 0.15);
  color: var(--brand-green);
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 800;
  margin: 0 auto 20px;
}

.result-screen h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 6px;
}

.result-screen p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.result-download-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.qr-code-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-light);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
}

.qr-preview-svg {
  width: 38px;
  height: 38px;
}

/* Tool In-Depth Guide & SEO Sections */
.tool-guide-section {
  padding: 48px 0;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0 54px;
}

.guide-step-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.guide-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
}

.guide-step-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 8px;
}

.guide-step-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .guide-steps-grid { grid-template-columns: 1fr; }
  .workspace-wrapper { padding: 20px 14px; }
  .files-preview-grid { grid-template-columns: repeat(2, 1fr); }
}
