/* Upload section center & card style */
#pdfUploadSection {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Upload card */
.pdf-upload-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  max-width: 420px;
  width: 100%;
}

.pdf-upload-card h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.pdf-upload-card p {
  color: #666;
  font-size: 15px;
  margin-bottom: 25px;
}


/* ===== Preview Area ===== */
#pdfPreviewArea {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* ===== Preview Wrapper ===== */
.pdf-preview-wrapper {
  position: relative;        /* 🔥 badge ke liye */
  width: 220px;              /* 🔥 hard limit */
  max-width: 220px;
}

/* ===== Preview Image ===== */
#pdfPreviewImg {
  width: 100% !important;    /* wrapper ke andar fit */
  height: auto !important;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform .25s ease;
}
#pdfPreviewImg:hover {
  transform: scale(1.03);
}

/* ===== Page Count Badge ===== */
.page-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 5;
}

.pdf-preview-wrapper:hover .page-count-badge {
  opacity: 1;
}

/* ===== Bottom Action Bar ===== */
.pdf-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 16px;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}

/* ===== Add / Replace Button ===== */
.pdf-add-more {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px dashed #0d6efd;
  background: #fff;
  color: #0d6efd;
  font-size: 26px;
  cursor: pointer;
}

.pdf-add-more:hover {
  background: #0d6efd;
  color: #fff;
}

/* ===== Convert Button ===== */
.pdf-btn-success {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  background: #198754;
  color: #fff;
  cursor: pointer;
}

.pdf-btn-success:hover {
  background: #157347;
}

/* Loader wrapper */
.pdf-loader{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin-top:20px;
  color:#555;
  font-size:14px;
}

/* Spinner */
.spinner{
  width:38px;
  height:38px;
  border:4px solid #e0e0e0;
  border-top:4px solid #0d6efd;
  border-radius:50%;
  animation: spin 1s linear infinite;
  margin-bottom:10px;
}

.pdf-preview-wrapper {
    position: relative;
}

.pdf-close-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff4d4f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 15px;
  z-index: 20;
}

.pdf-close-btn:hover {
  background: #d9363e;
}


@keyframes spin{
  0%{transform:rotate(0deg);}
  100%{transform:rotate(360deg);}
}


@media (max-width:576px){
  .page-count-badge{
    opacity:1;
  }
}