/**
 * Tool Page Styles
 * Specific styles for individual tool pages
 */

/* ===========================
   Tool Page Layout
   =========================== */

.tool-page {
  padding: var(--space-12) 0;
  min-height: calc(100vh - 200px);
}

/* ===========================
   Page Header
   =========================== */

.page-header {
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.breadcrumb a {
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--brand-600);
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--brand-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Mobile Page Header */
@media (max-width: 768px) {
  .page-header {
    margin-bottom: var(--space-8);
  }

  .page-title {
    font-size: 2rem;
  }

  .page-description {
    font-size: 1rem;
  }
}

/* ===========================
   Tool Workspace
   =========================== */

.tool-workspace {
  max-width: 900px;
  margin: 0 auto var(--space-16);
}

/* Enhanced Dropzone for Tool Pages */
.tool-workspace .dropzone {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tool-workspace .dropzone-icon {
  width: 100px;
  height: 100px;
  color: var(--brand-600);
  margin-bottom: var(--space-6);
  opacity: 0.7;
  transition: all var(--transition-base);
}

.tool-workspace .dropzone:hover .dropzone-icon {
  opacity: 1;
  transform: translateY(-4px);
}

.tool-workspace .dropzone.dragover .dropzone-icon {
  opacity: 1;
  transform: scale(1.1);
  color: var(--brand-700);
}

.dropzone-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.dropzone-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.dropzone-or {
  margin-top: var(--space-6);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Mobile Dropzone */
@media (max-width: 768px) {
  .tool-workspace .dropzone {
    min-height: 320px;
    padding: var(--space-8);
  }

  .tool-workspace .dropzone-icon {
    width: 80px;
    height: 80px;
  }

  .dropzone-title {
    font-size: 1.25rem;
  }

  .dropzone-description {
    font-size: 0.875rem;
  }
}

/* ===========================
   File List
   =========================== */

.file-list {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.file-preview {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-preview:hover {
  border-color: var(--brand-600);
  box-shadow: var(--shadow-md);
}

.file-preview-icon {
  width: 56px;
  height: 56px;
  background: var(--brand-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  flex-shrink: 0;
}

.file-preview-info {
  flex: 1;
  min-width: 0;
}

.file-preview-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-1);
}

.file-preview-size {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.file-preview-remove {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--error);
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-preview-remove:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Mobile File List */
@media (max-width: 768px) {
  .file-preview {
    gap: var(--space-3);
  }

  .file-preview-icon {
    width: 48px;
    height: 48px;
  }

  .file-preview-name {
    font-size: 0.875rem;
  }

  .file-preview-size {
    font-size: 0.75rem;
  }
}

/* ===========================
   Convert Section
   =========================== */

.convert-section {
  margin-top: var(--space-8);
  text-align: center;
  animation: fadeIn 0.3s ease-in;
}

/* ===========================
   Progress Section
   =========================== */

.progress-section {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  animation: fadeIn 0.3s ease-in;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.progress-info span:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.progress-info span:last-child {
  font-weight: 700;
  color: var(--brand-600);
  font-size: 1.125rem;
}

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

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600) 0%, var(--brand-400) 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

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

/* ===========================
   How It Works Section
   =========================== */

.how-it-works {
  margin: var(--space-20) 0;
  text-align: center;
}

.how-it-works .section-title {
  margin-bottom: var(--space-12);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-card::after {
  content: '→';
  position: absolute;
  top: 40px;
  right: -30px;
  font-size: 2rem;
  color: var(--brand-300);
  font-weight: 300;
}

.step-card:last-child::after {
  display: none;
}

.step-number {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
  color: white;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.step-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Mobile Steps */
@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .step-card::after {
    content: '↓';
    top: auto;
    bottom: -60px;
    right: 50%;
    transform: translateX(50%);
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* ===========================
   Tool Features
   =========================== */

.tool-features {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  margin: var(--space-12) 0;
}

.features-grid-small {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.feature-item svg {
  flex-shrink: 0;
  color: var(--brand-600);
  margin-top: 4px;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Mobile Features */
@media (max-width: 768px) {
  .tool-features {
    padding: var(--space-6);
  }

  .features-grid-small {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}
