/* Document to Markdown Converter - Tool Specific Styles */

.upload-area {
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.upload-text {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.upload-hint {
  color: #666;
  margin-bottom: 16px;
}

.upload-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.upload-btn:hover {
  background: #1d4ed8;
}

.upload-limit {
  font-size: 14px;
  color: #999;
  margin-top: 12px;
}

/* File List */
.file-list {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 8px;
}

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

.file-icon {
  font-size: 24px;
}

.file-name {
  font-weight: 500;
  color: #333;
}

.file-size {
  font-size: 14px;
  color: #666;
}

.file-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.file-remove:hover {
  background: #fee2e2;
}

/* Progress Container */
.progress-container {
  margin: 20px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.3s ease;
}

.progress-container span {
  font-size: 14px;
  color: #666;
}

/* Results Container */
.results-container {
  margin-top: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
}

.results-container h3 {
  margin-bottom: 16px;
  color: #1a1a2e;
}

.results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.result-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.result-info {
  padding: 12px;
}

.result-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-stats {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

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

.result-download,
.result-preview {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.result-download {
  background: #2563eb;
  color: white;
}

.result-download:hover {
  background: #1d4ed8;
}

.result-preview {
  background: #f59e0b;
  color: white;
}

.result-preview:hover {
  background: #d97706;
}

.result-error {
  padding: 12px;
}

.error-message {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}

.results-summary {
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 16px;
}

.results-summary p {
  margin: 0;
  font-size: 14px;
  color: #333;
}

/* Markdown Preview */
.markdown-preview {
  margin-top: 20px;
  padding: 20px;
  background: #1e293b;
  border-radius: 12px;
  color: #f8fafc;
  display: none;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}

.preview-header h4 {
  margin: 0;
  color: #f1f5f9;
}

.close-preview {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.close-preview:hover {
  background: #334155;
  color: #f1f5f9;
}

.preview-content {
  max-height: 400px;
  overflow-y: auto;
}

.preview-content pre {
  margin: 0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Supported Formats */
.supported-formats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.format-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .results-list {
    grid-template-columns: 1fr;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .preview-content {
    max-height: 300px;
  }
  
  .supported-formats {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}