/**
 * ONE RESIZER — Tool 22: Word to PDF Stylesheet
 * High-Fidelity DOCX Preview Stage, Paper & Margin Configuration Panel,
 * Vector Conversion Engine, and Responsive 2-Column Studio.
 */

/* ========================================================
   CONTAINER & WORKSPACE VIEWS
   ======================================================== */
.wordpdf-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wordpdf-view {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.wordpdf-view.hidden {
  display: none !important;
}

/* ========================================================
   UPLOAD HERO SCREEN
   ======================================================== */
.upload-hero-card {
  background: var(--bg-card);
  border: 2px dashed var(--primary-cyan);
  border-radius: var(--radius-xl);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.upload-hero-card:hover, .upload-hero-card.dragover {
  background: rgba(37, 99, 235, 0.08);
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.upload-icon-wrapper {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}
.upload-icon-wrapper svg {
  width: 36px;
  height: 36px;
  stroke: currentColor;
  fill: none;
}

.upload-heading {
  font-size: 20px;
  font-weight: 850;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.upload-subheading {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.upload-btn-fake {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  padding: 9px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  margin-bottom: 14px;
  transition: var(--transition);
}
.upload-btn-fake:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.upload-formats-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 5px 14px;
  border-radius: var(--radius-full);
}

/* ========================================================
   WORKSPACE 2-COLUMN STUDIO LAYOUT
   ======================================================== */
.wordpdf-studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 950px) {
  .wordpdf-studio-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Settings Panel */
.wordpdf-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

/* Mini File Bar */
.wordpdf-file-mini-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 18px;
}
.wordpdf-mini-info {
  min-width: 0;
}
.wordpdf-mini-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.wordpdf-mini-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.wordpdf-btn-change {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 750;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.wordpdf-btn-change:hover {
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

/* Form Groups */
.wordpdf-form-group {
  margin-bottom: 16px;
}
.wordpdf-label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 8px;
  display: block;
}

/* Segmented Button Groups */
.wordpdf-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.wordpdf-btn-group.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.wordpdf-opt-btn {
  padding: 8px 6px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.wordpdf-opt-btn:hover {
  color: var(--text-heading);
}
.wordpdf-opt-btn.active {
  background: var(--bg-card);
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: var(--shadow-sm);
}

/* Action Button */
.wordpdf-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
  margin-top: 10px;
}
.wordpdf-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45);
}
.wordpdf-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Progress Bar */
.wordpdf-progress-card {
  margin-top: 18px;
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: none;
}
.wordpdf-progress-card.active {
  display: block;
}
.wordpdf-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.wordpdf-progress-track {
  width: 100%;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.wordpdf-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #10b981);
  transition: width 0.2s ease;
}

/* Results Card */
.wordpdf-results-card {
  margin-top: 20px;
  padding: 22px;
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.06);
  border-radius: var(--radius-xl);
  display: none;
}
.wordpdf-results-card.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
.wordpdf-results-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16.5px;
  font-weight: 900;
  color: #10b981;
  margin-bottom: 14px;
}
.wordpdf-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 600px) {
  .wordpdf-metrics-grid {
    grid-template-columns: 1fr;
  }
}
.wordpdf-metric-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}
.wordpdf-metric-label {
  font-size: 10.5px;
  font-weight: 750;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}
.wordpdf-metric-value {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-heading);
}

.wordpdf-download-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: #10b981;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  transition: var(--transition);
  margin-bottom: 10px;
}
.wordpdf-download-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}
.wordpdf-btn-secondary {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-heading);
  font-size: 12px;
  font-weight: 750;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.wordpdf-btn-secondary:hover {
  border-color: #2563eb;
  color: #2563eb;
}

/* ========================================================
   RIGHT COLUMN: LIVE WORD DOCUMENT PREVIEW STAGE
   ======================================================== */
.wordpdf-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.wordpdf-preview-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.wordpdf-preview-title {
  font-size: 14px;
  font-weight: 850;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wordpdf-paper-stage {
  width: 100%;
  max-height: 540px;
  overflow-y: auto;
  background: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.08);
}

.wordpdf-paper-sheet {
  width: 100%;
  max-width: 500px;
  min-height: 600px;
  background: #ffffff;
  color: #1e293b;
  padding: 36px 32px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-radius: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Word Document Elements Styling inside Sheet */
.wordpdf-paper-sheet h1 { font-size: 20px; font-weight: 850; color: #0f172a; margin-top: 0; margin-bottom: 12px; }
.wordpdf-paper-sheet h2 { font-size: 16.5px; font-weight: 800; color: #1e293b; margin-top: 14px; margin-bottom: 8px; }
.wordpdf-paper-sheet h3 { font-size: 14.5px; font-weight: 750; color: #334155; margin-top: 12px; margin-bottom: 6px; }
.wordpdf-paper-sheet p { margin-top: 0; margin-bottom: 10px; }
.wordpdf-paper-sheet ul, .wordpdf-paper-sheet ol { padding-left: 20px; margin-top: 0; margin-bottom: 10px; }
.wordpdf-paper-sheet li { margin-bottom: 4px; }
.wordpdf-paper-sheet table { width: 100%; border-collapse: collapse; margin-top: 10px; margin-bottom: 14px; font-size: 12.5px; }
.wordpdf-paper-sheet th, .wordpdf-paper-sheet td { border: 1px solid #cbd5e1; padding: 6px 10px; text-align: left; }
.wordpdf-paper-sheet th { background: #f1f5f9; font-weight: 800; }
.wordpdf-paper-sheet img { max-width: 100%; height: auto; border-radius: 3px; margin: 8px 0; }
