/* ==========================================================================
   Tools Hub - Tool Pages Specific Styles
   ========================================================================== */

.tool-page-header {
  padding: 2.5rem 0 2rem 0;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.tool-category-badge {
  margin-bottom: 0.75rem;
}

.tool-page-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .tool-page-title {
    font-size: 1.85rem;
  }
}

.tool-page-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Tool Workspace Card
   -------------------------------------------------------------------------- */
.tool-workspace {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 4rem;
}

@media (max-width: 640px) {
  .tool-workspace {
    padding: 1.25rem;
  }
}

.tool-workspace-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 860px) {
  .tool-workspace-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.tool-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tool-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.tool-pane-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Preview Canvas / Image Box */
.preview-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.preview-container img,
.preview-container canvas {
  max-width: 100%;
  max-height: 380px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.preview-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.preview-meta-item {
  font-weight: 600;
}

/* Stats Counter Grid (Word Counter, etc.) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}

/* Reorderable file list for PDF Merger */
.pdf-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.pdf-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  gap: 0.75rem;
}

.pdf-file-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

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

.pdf-file-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Color Picker specific styles */
.color-preview-box {
  height: 120px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  transition: background-color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.color-swatch-item {
  height: 50px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Calculation Result Highlights */
.result-callout {
  background: var(--primary-light);
  border: 1px solid var(--primary-glow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
}

.result-callout-value {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.result-callout-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Structured Content Sections on Tool Pages
   -------------------------------------------------------------------------- */
.tool-content-section {
  margin-bottom: 3.5rem;
}

.tool-content-heading {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tool-content-heading svg {
  color: var(--primary);
  width: 24px;
  height: 24px;
}

/* Step-by-step instructions */
.instruction-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.instruction-step {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.instruction-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.instruction-step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature-box-icon {
  width: 40px;
  height: 40px;
  background: var(--secondary-light);
  color: var(--secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-box-icon svg {
  width: 20px;
  height: 20px;
}

.feature-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Related Tools Grid */
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Educational SEO article */
.tool-seo-body {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.tool-seo-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.tool-seo-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.5rem 0 0.75rem 0;
}

.tool-seo-body p {
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.tool-seo-body ul,
.tool-seo-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.tool-seo-body li {
  margin-bottom: 0.4rem;
}
