/* merge-posts.component.css */

.container {
  min-height: 100vh;
  // background: #f8fafc;
  padding: 2rem 1rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.header-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.icon-large {
  width: 2.5rem;
  height: 2.5rem;
  color: #3b82f6;
}

.icon-zap {
  width: 2rem;
  height: 2rem;
  color: #f59e0b;
}

.subtitle {
  color: #64748b;
  font-size: 1.125rem;
  margin: 0;
}

.upload-area {
  max-width: 72rem;
  margin: 0 auto 2rem;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-area:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.upload-area.dragging {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.upload-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 1rem;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.upload-icon.bounce {
  animation: bounce 0.5s infinite;
}

.upload-title {
  font-size: 1.25rem;
  color: #1e293b;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.upload-subtitle {
  color: #64748b;
  margin: 0;
}

.progress-container {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-filename {
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
}

.progress-percent {
  color: #3b82f6;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 0.75rem;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  transition: width 0.2s ease;
  border-radius: 9999px;
}

.files-section,
.controls-section,
.result-section {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.icon-check {
  width: 1.5rem;
  height: 1.5rem;
  color: #10b981;
}

.icon-small {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-danger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.file-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.file-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-controls {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.btn-icon {
  padding: 0.25rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s ease;
}

.btn-icon:hover:not(:disabled) {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.btn-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.file-info {
  flex: 1;
}

.file-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.file-name {
  color: #1e293b;
  font-weight: 600;
}

.file-size {
  color: #64748b;
  font-size: 0.875rem;
}

.offset-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offset-label {
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
}

.offset-select {
  background: white;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offset-select:hover {
  border-color: #3b82f6;
}

.offset-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-remove {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  color: #ef4444;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background: #fef2f2;
  border-color: #ef4444;
  transform: scale(1.05);
}

.controls-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.program-number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-label {
  color: #1e293b;
  font-weight: 600;
}

.number-input {
  background: white;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  width: 8rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.number-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.number-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
}

.btn-primary,
.btn-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-primary:disabled,
.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover,
.btn-success:disabled:hover {
  transform: none;
}

/* Merge Progress Styles */
.merge-progress-container {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  background: white;
  border: 2px solid #3b82f6;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.merge-progress-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.spinner1 {
  width: 2rem;
  height: 2rem;
  border: 3px solid #dbeafe;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.merge-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.merge-status {
  color: #475569;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.merge-progress-bar {
  width: 100%;
  height: 1.5rem;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
}

.merge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 50%, #3b82f6 100%);
  background-size: 200% 100%;
  transition: width 0.3s ease;
  border-radius: 9999px;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.merge-percent {
  text-align: right;
  color: #3b82f6;
  font-weight: 700;
  font-size: 1.125rem;
}

.result-textarea {
  width: 100%;
  background: #f8fafc;
  color: #059669;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  resize: vertical;
}

.result-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/**/

.merge-progress {
  margin-top: 16px;
  padding: 12px;
  background: #f5f7fa;
  border-radius: 8px;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.stat-icon {
  font-size: 32px;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
}

.download-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-action {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.text-input {
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.text-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.result-section {
  margin-top: 24px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.result-stat-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.result-stat-label {
  font-weight: 500;
  color: #666;
}

.result-stat-value {
  font-weight: 600;
  color: #333;
}

.gcode-preview {
  margin-top: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 2px solid #e2e8f0;
}

.preview-title {
  font-weight: 600;
  color: #333;
}

.preview-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-small:hover {
  background: #5568d3;
  transform: translateY(-1px);
}

.gcode-content {
  max-height: 400px;
  overflow: auto;
  padding: 16px;
  margin: 0;
  background: #282c34;
  color: #abb2bf;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.gcode-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.gcode-content::-webkit-scrollbar-track {
  background: #1e2127;
}

.gcode-content::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.gcode-content::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}


.file-list-container {
  height: 600px;
  overflow-y: auto;
  position: relative;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
}

.file-card {
  /* GPU acceleration */
  transform: translateZ(0);
  backface-visibility: hidden;

  /* Optimize reflow */
  contain: layout style;
}

/* Smooth scrolling */
.file-list-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}


/* ============================================================================
   MODERN SETTINGS MODAL STYLES
   ============================================================================ */

   .plugin-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
  
    &:hover {
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      border-color: #d9d9d9;
    }
  
    &.plugin-disabled {
      opacity: 0.6;
      background: #fafafa;
    }
  }
  
  .plugin-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
  
    .plugin-card:hover & {
      background: linear-gradient(to right, rgba(102, 126, 234, 0.02), transparent);
    }
  }
  
  .plugin-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 8px;
  }
  
  .plugin-settings {
    padding: 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
    }
    to {
      opacity: 1;
      max-height: 1000px;
    }
  }
  
  .settings-grid {
    display: grid;
    gap: 16px;
  }
  
  .setting-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
  }
  
  .setting-boolean {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  
  .setting-number,
  .setting-text {
    label {
      display: block;
      font-size: 13px;
      font-weight: 500;
      color: #262626;
      margin-bottom: 8px;
    }
  
    small {
      display: block;
      font-size: 11px;
      color: #8c8c8c;
      margin-top: 4px;
    }
  }
  
  .feature-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 4px;
      height: 100%;
      background: linear-gradient(180deg, #667eea, #764ba2);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
  
    &:hover {
      border-color: #d9d9d9;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
      transform: translateY(-2px);
    }
  
    &.feature-enabled {
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
      border-color: rgba(102, 126, 234, 0.4);
  
      &::before {
        opacity: 1;
      }
    }
  }
  
  .feature-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }
  
  .feature-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 12px;
    flex-shrink: 0;
  }
  
  .feature-title {
    font-size: 15px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 4px;
  }
  
  .feature-description {
    font-size: 12px;
    color: #8c8c8c;
    line-height: 1.5;
  }
  
  .toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
  
    &:hover {
      background: #f5f5f5;
      border-color: #e8e8e8;
    }
  
    span {
      font-size: 13px;
      color: #262626;
      font-weight: 500;
    }
  }

  // Enhanced Settings Modal Styling
.nz-modal {
  .ant-card {
    transition: all 0.3s ease;
    
    &:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
  }
  
  .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
    padding: 12px 24px;
    font-weight: 500;
    
    &:hover {
      color: #1890ff;
    }
  }
  
  .ant-switch-checked {
    background-color: #52c41a;
  }
  
  .ant-input-number,
  .ant-select {
    &:hover {
      border-color: #40a9ff;
    }
    
    &:focus {
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }
  }
  
  .gradient-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
  }
}

// Plugin Cards
.plugin-card {
  border-radius: 8px;
  transition: all 0.3s ease;
  
  &.enabled {
    border-color: #52c41a;
    border-width: 2px;
  }
  
  &.disabled {
    opacity: 0.6;
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

// Feature Cards
.feature-card {
  border-radius: 12px;
  transition: all 0.3s ease;
  
  &.enabled {
    border-color: #52c41a;
    background: linear-gradient(135deg, #f0fff4 0%, #e6f7ff 100%);
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}