/* 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: 4rem;
    height: 4rem;
    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;
  }
  
  .spinner {
    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);
    }
  }

  /**/

  /* Recent Files Modal Styles */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 24px;
  max-width: 1200px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1000;
}

.modal::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Loading and Error States */
.modal > div:first-child {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.error {
  background: #fee;
  color: #c33;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  border-left: 4px solid #c33;
}

/* File Grid Container */
.modal > div:not(:first-child):not(.error) {
  display: grid;
  grid-template-columns: 40px 1fr 80px 140px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  transition: background 0.2s;
}

.modal > div:not(:first-child):not(.error):hover {
  background: #f9fafb;
}

/* Checkbox */
.modal input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

/* File Name */
.modal > div > span:nth-of-type(1) {
  font-weight: 500;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

/* File Size */
.modal > div > span:nth-of-type(2) {
  color: #6b7280;
  font-size: 13px;
  text-align: right;
}

/* Date Modified */
.modal > div > span:nth-of-type(3) {
  color: #6b7280;
  font-size: 13px;
  text-align: right;
}

/* Action Buttons Container */
.modal > button {
  margin-top: 20px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 10px;
}

.modal > button:first-of-type {
  background: #3b82f6;
  color: white;
}

.modal > button:first-of-type:hover {
  background: #2563eb;
}

.modal > button:last-of-type {
  background: #e5e7eb;
  color: #374151;
}

.modal > button:last-of-type:hover {
  background: #d1d5db;
}

/* Main Button (outside modal) */
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

button:not([disabled]) {
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal {
    width: 95%;
    padding: 16px;
  }
  
  .modal > div:not(:first-child):not(.error) {
    grid-template-columns: 30px 1fr 60px 100px;
    gap: 8px;
    font-size: 13px;
  }
}