/* PDF Merger — page specific overrides (uses variables from main.css) */
.tool-container { padding: 80px 0; min-height: calc(100vh - 200px); }
.tool-header { text-align:center; margin-bottom: 40px; }
.tool-header h1 { font-size: 2.2rem; margin-bottom: 8px; color: var(--text); }
.tool-header p { color: var(--text-light); }

.merger-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  margin-bottom: 60px;
}

.upload-section, .result-section, .tool-info {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.result-section { display: flex; flex-direction: column; }

.upload-header, .result-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid rgba(227,6,19,.2);
}

.file-counter { background:#f8fafc; padding:6px 12px; border-radius: 20px; border:1px solid #e5e7eb; color:var(--text-light); }

.upload-box {
  border:2px dashed #e5e7eb; border-radius: var(--radius);
  min-height:200px; margin-bottom: 22px; position: relative; overflow:hidden;
  transition: var(--transition);
  cursor: pointer;
}
.upload-box:focus { outline: none; box-shadow: 0 0 0 3px rgba(227,6,19,.16); }
.upload-box.dragover { border-color: var(--primary); background: rgba(227,6,19,.05); }
.upload-content { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:40px 20px; text-align:center; }
.upload-content i { font-size: 3rem; color:#e5e7eb; margin-bottom: 10px; }
.upload-content p { color: var(--text-light); margin-bottom: 14px; }
.upload-box input[type=file] { position:absolute; width:0; height:0; opacity:0; }

.file-list-container { margin-bottom: 22px; }
.file-list-container h4 { margin-bottom: 12px; color: var(--text); }
.file-list {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  background: #f8fafc;
}
.empty-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-light);
}
.empty-list i { font-size: 2.5rem; margin-bottom: 10px; color: #e5e7eb; }

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  cursor: move;
  transition: var(--transition);
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: #f1f5f9; }
.file-item.dragging { opacity: 0.5; background: rgba(227,6,19,.05); }
.file-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.file-icon { color: #e30613; font-size: 1.2rem; }
.file-details { display: flex; flex-direction: column; }
.file-name { font-weight: 500; font-size: .95rem; }
.file-size { font-size: .8rem; color: var(--text-light); }
.file-actions { display: flex; gap: 8px; }
.file-action-btn {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}
.file-action-btn:hover { background: rgba(0,0,0,.08); }
.file-action-btn.remove:hover { color: #ef4444; background: rgba(239,68,68,.12); }
.file-action-btn.up:hover, .file-action-btn.down:hover { color: var(--primary); }

.list-actions { margin-top: 12px; text-align: center; }

.merge-options { margin-bottom: 22px; }
.merge-options h4 { margin-bottom: 12px; color: var(--text); }
.option { display: flex; flex-direction: column; margin-bottom: 14px; }
.option label { margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
.option input {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #fff;
  font-size: .95rem;
}
.option input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(227,6,19,.1);
}

.merge-actions { text-align: center; }

.result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 18px;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
  min-height: 200px;
}
.empty-result { text-align: center; color: var(--text-light); }
.empty-result i { font-size: 2.3rem; color: #e5e7eb; margin-bottom: 10px; }

.result-preview {
  width: 100%;
  text-align: center;
}
.result-preview i {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 16px;
}
.result-preview h4 {
  margin-bottom: 8px;
  color: var(--text);
}
.result-preview p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.merge-info {
  margin-top: 8px;
  padding: 12px;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
}
.merge-info h4 { margin: 0 0 8px 0; font-size: .95rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.info-item { display: flex; flex-direction: column; }
.info-label { font-size: .8rem; color: var(--text-light); }
.info-value { font-weight: 600; }

.download-section { text-align: center; padding-top: 14px; border-top: 1px solid #e5e7eb; }
.download-section button { min-width: 200px; }

/* Progress indicator */
.progress-container {
  width: 100%;
  margin: 20px 0;
}
.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Tool info */
.tool-info h2 { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid rgba(227,6,19,.2); }
.tool-info h3 { margin: 18px 0 10px; color: var(--primary); }
.tool-info ul, .tool-info ol { margin-left: 18px; margin-bottom: 12px; }
.tool-info li { margin-bottom: 6px; }

/* Responsive */
@media (max-width: 980px) {
  .merger-container { grid-template-columns: 1fr; }
}