/* PNG to SVG Converter Styles */

.upload-section {
  margin-top: 20px;
}

.file-list-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  transition: all 0.2s;
}

.file-item:hover {
  border-color: var(--primary);
  background: #eef2ff;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.file-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}

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

.file-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.file-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.file-remove:hover {
  background: #fef2f2;
  color: #ef4444;
}

.range-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
  background: var(--primary-hover);
}

.range-value {
  min-width: 30px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.checkbox-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.checkbox-option input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Action Section */
.action-section {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.preview-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.preview-item {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: all 0.2s;
}

.preview-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.preview-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.preview-status {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.preview-status.success {
  background: #dcfce7;
  color: #166534;
}

.preview-status.error {
  background: #fef2f2;
  color: #991b1b;
}

.preview-status.processing {
  background: #dbeafe;
  color: #1e40af;
}

.preview-content {
  display: flex;
  gap: 16px;
  padding: 16px;
}

.preview-image-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
}

.preview-image {
  width: 100%;
  height: 120px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image:
    linear-gradient(45deg, #f3f4f6 25%, transparent 25%),
    linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f4f6 75%),
    linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.preview-image img,
.preview-image svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
}

.preview-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preview-btn.primary {
  background: var(--primary);
  color: #fff;
}

.preview-btn.primary:hover {
  background: var(--primary-hover);
}

.preview-btn.secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.preview-btn.secondary:hover {
  background: var(--gray-200);
}

/* Toast notification */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* Progress bar */
.progress-container {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Compare Table */
.compare-table-wrapper {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.compare-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
}

.compare-table td:first-child {
  font-weight: 500;
  color: var(--gray-700);
}

.compare-table tr:hover {
  background: #f9fafb;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .settings-grid {
    gap: 12px;
  }
  
  .preview-grid {
    grid-template-columns: 1fr;
  }
  
  .preview-content {
    flex-direction: column;
  }
  
  .action-section {
    flex-direction: column;
    align-items: center;
  }
  
  .action-section .btn {
    width: 100%;
    max-width: 320px;
  }
  
  .radio-group {
    gap: 6px;
  }
  
  .radio-option {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  
  .checkbox-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 16px;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .dropzone {
    padding: 32px 16px;
  }
  
  .preview-item {
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}