/* ===============================
   BASE
=============================== */
.pdf-tool-area {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

button {
  border: none;
  cursor: pointer;
  font-weight: 600;
}

/* ===============================
   UPLOAD
=============================== */
.upload-box {
  text-align: center;
  margin-bottom: 16px;
}

.upload-btn {
  display: inline-block;
  padding: 12px 18px;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.upload-btn input {
  display: none;
}

.upload-hint {
  font-size: 13px;
  color: #555;
  margin-top: 6px;
}

/* ===============================
   PDF LIST
=============================== */
.pdf-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

/* ===============================
   PDF ITEM
=============================== */
.pdf-file {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.pdf-file:hover {
  box-shadow: 0 0 0 2px #2563eb;
}

/* Badge */
.pdf-badge {
  position: absolute;
  transform: translate(-6px, -6px);
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
}

/* ===============================
   THUMBNAIL
=============================== */
.pdf-thumb {
  width: 48px;
  height: 64px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-thumb canvas {
  width: 100%;
  height: auto;
}

/* Encrypted */
.pdf-encrypted .pdf-thumb {
  font-size: 22px;
  color: #b91c1c;
}

/* ===============================
   INFO
=============================== */
.pdf-info {
  font-size: 13px;
}

.pdf-name {
  font-weight: 600;
  word-break: break-all;
}

.pdf-meta {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
}

/* ===============================
   REMOVE
=============================== */
.pdf-remove {
  background: #ef4444;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}

/* ===============================
   ACTIONS
=============================== */
.pdf-actions {
  margin-top: 16px;
}

#mergeBtn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #16a34a;
  color: #fff;
  font-size: 16px;
}

#mergeBtn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ===============================
   PROGRESS
=============================== */
.progress-bar {
  margin-top: 10px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    #22c55e,
    #16a34a
  );
  transition: width 0.25s ease;
}

/* ===============================
   MOBILE
=============================== */
@media (max-width: 640px) {
  .pdf-file {
    grid-template-columns: 44px 1fr auto;
  }

  .pdf-thumb {
    width: 40px;
    height: 56px;
  }

  #mergeBtn {
    font-size: 15px;
  }
}
