/* FileConverter WordPress Plugin Styles */

.file-converter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
}

.file-converter-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}

/* Upload Area Styles */
.file-upload-area {
  border: 3px dashed #e2e8f0;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s ease;
  background: #f8fafc;
  cursor: pointer;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload-area:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-2px);
}

.file-upload-area.dragging {
  border-color: #3b82f6;
  background: #dbeafe;
  transform: scale(1.02);
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: #6b7280;
  transition: color 0.3s ease;
}

.file-upload-area:hover .upload-icon {
  color: #3b82f6;
}

.upload-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.upload-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.upload-info {
  font-size: 12px;
  color: #6b7280;
  margin-top: 12px;
}

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

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.file-list-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.convert-all-button {
  padding: 8px 16px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.convert-all-button:hover {
  background: #059669;
  transform: translateY(-1px);
}

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

.file-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.file-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.file-icon {
  width: 24px;
  height: 24px;
  color: #3b82f6;
  flex-shrink: 0;
}

.file-details h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  word-break: break-word;
}

.file-details p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.remove-button {
  padding: 4px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-button:hover {
  background: #fee2e2;
  color: #dc2626;
}

.image-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.action-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.convert-button {
  background: #dbeafe;
  color: #1d4ed8;
}

.convert-button:hover:not(:disabled) {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.convert-button.converting {
  background: #fef3c7;
  color: #d97706;
  cursor: not-allowed;
}

.convert-button.converted {
  background: #dcfce7;
  color: #16a34a;
  cursor: not-allowed;
}

.convert-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.download-button {
  background: #dcfce7;
  color: #16a34a;
}

.download-button:hover {
  background: #bbf7d0;
  transform: translateY(-1px);
}

/* Sidebar Styles */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.format-selector {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.format-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
}

.format-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #1f2937;
  margin-bottom: 16px;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.format-option:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.format-option.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.format-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.format-label {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.supported-formats {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.supported-formats .format-title {
  font-size: 14px;
  margin-bottom: 12px;
}

.input-formats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.input-format {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
}

.input-format .format-dot {
  width: 6px;
  height: 6px;
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { 
    transform: rotate(360deg); 
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .file-converter-container {
    padding: 15px;
  }
  
  .file-converter-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .file-upload-area {
    padding: 30px 15px;
  }
  
  .upload-title {
    font-size: 18px;
  }
  
  .files-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .format-grid {
    grid-template-columns: 1fr;
  }
  
  .file-list-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .convert-all-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .file-converter-container {
    padding: 10px;
  }
  
  .file-upload-area {
    padding: 20px 10px;
  }
  
  .upload-title {
    font-size: 16px;
  }
  
  .upload-subtitle {
    font-size: 13px;
  }
  
  .file-item {
    padding: 12px;
  }
}

/* Dark Theme Support */
.file-converter-container.dark-theme {
  background: #111827;
  color: #f9fafb;
}

.dark-theme .file-upload-area {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.dark-theme .file-upload-area:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
}

.dark-theme .file-item {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.dark-theme .format-selector,
.dark-theme .supported-formats {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.dark-theme .format-select {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark-theme .format-option {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark-theme .format-option:hover {
  background: #4b5563;
}

.dark-theme .format-option.active {
  background: #1e3a8a;
  border-color: #3b82f6;
}

.dark-theme .upload-title,
.dark-theme .format-title,
.dark-theme .file-details h4 {
  color: #f9fafb;
}

.dark-theme .upload-subtitle,
.dark-theme .file-details p,
.dark-theme .upload-info {
  color: #d1d5db;
}