/* ===== STEP BASE ===== */
.step {
  display: none;
  width: 100%;
}

.step.active {
    display: flex;
    justify-content: center;
}
.password-error {
  color: #dc3545;
  font-size: 14px;
  margin-top: 6px;
}
.eye-icon {
    width: 24px;
    height: 24px;
    display: flex;
    background-size: contain;
    background-repeat: no-repeat;
    padding: 12px;
}

.eye-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7 0-10 7-10 7s3 7 10 7 10-7 10-7-3-7-10-7Zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z'/%3E%3C/svg%3E");
}

.eye-closed {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 5.27 3.28 4 20 20.72 18.73 22l-3.2-3.2A10.94 10.94 0 0 1 12 19C5 19 2 12 2 12a18.77 18.77 0 0 1 4.17-5.73L2 5.27Zm7.53 7.53a2.99 2.99 0 0 0 4.24 4.24l-4.24-4.24ZM12 7a4.97 4.97 0 0 1 5 5c0 .42-.06.82-.16 1.2l-1.63-1.63A3 3 0 0 0 11.43 8.8L9.8 7.16C10.18 7.06 10.58 7 11 7Z'/%3E%3C/svg%3E");
}
.protect-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.protect-filename {
  font-size: 14px;
  color: #555;
  max-width: 160px;
  text-align: center;
  word-break: break-word;
}

/* ===== STEP 1 ===== */
#step1 {
  align-items: center;
  justify-content: center;flex-direction: column;
}

#uploadPdfBtn {
    padding: 0px 44px;
    font-size: 21px;
    font-weight: 600;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0px;
    text-transform: capitalize;
    height: 72px;width: 270px;
}
a#downloadBtn:hover {
    color: white;
}

/* ===== STEP 2 ===== */
.right label input[type="radio"] {
    margin: 0px 8px 0px 0px;
}
input#customPages {
    border-radius: 4px;
    margin: 15px 0px;
    box-shadow: none;
    font-size: 14px;
    height: 44px;
    display: flex;
    align-items: center;
}
.right label.ptword {
    display: block;
}
#step2 {
  min-height: 420px;
}

#step2 .left {
    text-align: center;
    width: 60%;
}

#step2 .right {
    width: 40%;
    padding: 30px;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, .08);max-width: 420px;
}

#pdfThumb {
  width: 240px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

#pdfName {
  font-size: 14px;
  color: #333;
  word-break: break-all;
}

#convertBtn {
    margin: 10px 0px 0px;
    padding: 0px 24px;
    background: #0075db;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: capitalize;
    height: 44px;width: 100%;
}
div#pdfTool h2.tool-title {
    text-align: center;
    font-size: 32px;
}
div#pdfTool p.tool-desc {
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
}


#convertBtn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ===== STEP 3 ===== */
#step3 {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  text-align: center;
}

.btn-red {
    display: flex;
    color: white;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    padding: 0px;
    font-size: 21px;
    font-weight: 500;
    background: #e53935;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: capitalize;
    height: 72px;
    margin: 10px 0px;width: 270px;
}
img.buttonback {
    background: #333;
    height: 28px;
    width: 28px;
    padding: 6px;
    border-radius: 99px;
    margin-top: 10px;
}
.infosteps3 {
    background: #e9f6ff;
    border: 2px solid #bde5ff;
    border-radius: 8px;
    padding: 24px;
    text-align: left;
    margin: 20px 0 0px;max-width: 750px;
}
.infosteps3 h2 {
    font-size: 18px;
}
.infosteps3 p {
    font-size: 14px;
    margin: 0px;
}
#backBtn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    margin: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.right label {
    display: flex;
    align-items: center;
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #step2 {
    flex-direction: column;
  }

  #step2 .left,
  #step2 .right {
    width: 100%;
    border: none;
  }
}
/* ===== DOWNLOAD BUTTON LOADING ===== */
#downloadBtn.loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

/* spinner */
#downloadBtn.loading::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pdftools-spin 0.9s linear infinite;
}

/* animation */
@keyframes pdftools-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
/* ======================================================
   PDF TOOLS – TO PDF (IMAGE / WORD / PPT)
   Namespace: .pdf-tools.to-pdf
   ====================================================== */

.upload-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.compress-file img {
  opacity: 0;
  transition: opacity .25s ease;
}

.compress-file:not(.hidden) img {
  opacity: 1;
}

/* =====================
   STEPS
   ===================== */

.pdf-tools.to-pdf .step {
  display: none;
}

.pdf-tools.to-pdf .step.active {
  display: flex;
}

/* =====================
   STEP 1
   ===================== */

.pdf-tools.to-pdf #step1 {
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.pdf-tools.to-pdf .upload-btn {
    background: #e53935;
    color: #fff;
    border: none;
    padding: 0px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0px;
    width: 270px;
    height: 72px;
    font-size: 21px;
    font-weight: 500;
    text-transform: capitalize;
}
div#step1 p.tool-desc {
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
}
div#step1 h2.tool-title {
    text-align: center;
    font-size: 32px;
}
.pdf-tools.to-pdf .upload-btn:hover {
  background: #d32f2f;
}

.pdf-tools.to-pdf #fileList {
  font-size: 14px;
  color: #555;
}

/* =====================
   STEP 2 LAYOUT
   ===================== */

.pdf-tools.to-pdf #step2 {
  gap: 30px;
}

/* LEFT – PREVIEW */
.pdf-tools.to-pdf .left {
  flex: 1;
}

.pdf-tools.to-pdf .preview-area {
  min-height: 180px;
  border: 2px dashed #bbb;
  border-radius: 8px;
  padding: 15px;
  background: #fdfdfd;
  position: relative;
}

.pdf-tools.to-pdf .preview-area.dragover {
  background: #f3f8ff;
  border-color: #4a90e2;
}

.pdf-tools.to-pdf .preview-area .hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #aaa;
  font-size: 16px;
  pointer-events: none;
}

.pdf-tools.to-pdf .preview-item {
  background: #f1f1f1;
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-tools.to-pdf .right h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
div.pdf-tools h2.tool-title {
    font-size: 32px;
    text-align: center;
}
div.pdf-tools p.tool-desc {
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
}
/* =====================
   OPTIONS
   ===================== */

.pdf-tools.to-pdf .option-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #777;
    font-weight: 300;
}
.pdf-tools.to-pdf .compress-preview {
    min-height: unset;
    padding: 0px;
    border: none;
    background: unset;
    border-radius: unset;
    position: unset;
}
img#compressThumb {
    width: 240px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.compress-preview .pdf-info {
    font-size: 14px;
    color: #333;
}
.compress-preview .pdf-size {
    font-size: 16px;
    color: #0075db;
    font-weight: 500;
}
.option-group.compress-options small {
    font-size: 12px;
    margin-top: -10px;
    display: flex;
    justify-content: center;
    font-weight: 300;
}
.option-group.compress-options button.opt {
    font-size: 14px;
    font-weight: 500;
}
.pdf-tools.to-pdf .option-group select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.pdf-tools.to-pdf .opt {
    display: inline-block;
    padding: 2px 18px;
    margin-right: 0px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    font-size: 13px;
    cursor: pointer;
    text-transform: capitalize;
}

.pdf-tools.to-pdf .opt.active {
  background: #e53935;
  border-color: #e53935;
  color: #fff;
}

/* =====================
   CONVERT BUTTON
   ===================== */

.pdf-tools.to-pdf .convert-btn {
  width: 100%;
  background: #e53935;
  color: #fff;
  border: none;
  padding: 14px 0;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
}

.pdf-tools.to-pdf .convert-btn:hover {
  background: #d32f2f;
}

/* =====================
   STEP 3
   ===================== */
a#downloadBtn {
    background: #0075db;
}

.pdf-tools.to-pdf .download-btn {
  background: #0075db;
}

.pdf-tools.to-pdf .download-btn.loading {
  background: #ccc;
  pointer-events: none;
}

/* =====================
   ERROR TOAST
   ===================== */

.pdf-tools.to-pdf .upload-error {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #ffebee;
  color: #b71c1c;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
  z-index: 9999;
}

.pdf-tools.to-pdf .upload-error.show {
  display: block;
}
/* ===== PAGE PREVIEW LIST ===== */
#pagePreviewWrapper {
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 8px;
}

#pagePreviewList {
  display: flex;
  gap: 12px;
}

.page-item {
    width: 100px;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: grab;
    text-align: center;
    padding: 6px;
}

.page-item.dragging {
  opacity: 0.5;
}

.page-item img {
    width: 100%;
    height: 80px;
    display: block;
    border-radius: 4px;
    padding: 20px;object-fit: contain;
}
.page-item.portrait {
    width: 90px;
    height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0px;
}
.page-item.portrait .page-name {
    padding: 0px 5px 5px 5px;
    margin: 0px;
}
.page-item.portrait img {
    background: #eee;
    width: 100%;
    aspect-ratio: 16 / 9 !important;
    height: 100%;
    padding: 5px;
}
.page-item.portrait .page-label {
    margin: 0px;
}
.page-item.landscape {
    width: 160px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0px;
}
.page-item.landscape img {
    object-fit: contain;
    background: #eee;
    width: 100%;
    aspect-ratio: 9 / 16 !important;
    padding: 5px;
    height: 90px;
}
.page-item.landscape .page-label {
    padding-top: 5px;margin: 0px;
}
.page-item.landscape .page-name {
    padding-bottom: 5px;
    max-width: 160px;margin: 0px;
}
.page-item .page-label {
  margin-top: 6px;
  font-size: 12px;
  color: #555;
}

/* orientation preview */
.page-item.landscape img {
  aspect-ratio: 4 / 3;
}

.preview-area.dragover {
  border-color: #1976d2;
  background: #f3f8ff;
}
.page-name {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
/* ===============================
 * ROTATE PDF – GRID
 * =============================== */
.pdf-tools.rotate #pagePreviewList {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.inforotate {
    line-height: 20px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .3px;
    background-position: 16px;
    background-repeat: no-repeat;
    border-radius: 6px;
    text-align: left;
    color: #161616;
    padding: 15px 20px;
    background-color: #def2ff;
    border: 1px solid #008ee9;margin: 10px 0px 15px;
}
.inforotate p {
    margin: 0px;
}
.pdf-tools.rotate .rotate-page {
  width: 200px;
  height: 200px;
  flex: 0 0 200px;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.rotate-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
.rotate-canvas-wrap canvas {
  position: absolute;
  top: 50%;
  left: 50%;border: 1px solid #ccc;

  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;

  transform-origin: center center;
  transition: transform 0.2s ease;
}
.rotate-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);

  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;

  background: rgba(220, 53, 69, 0.85);
  color: #fff;
  font-size: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0.35;
  pointer-events: none;
}
.rotate-page:hover .rotate-controls {
  opacity: 1;
  pointer-events: auto;
}
.pdf-tools.rotate .rotate-all {
  display: flex;
  flex-direction: column;
}
.pdf-tools.rotate .rotate-all .opt {
  background: #e53935;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}
.pdf-tools.rotate .rotate-all .opt.active {
  background: #b71c1c;
}
.unlock-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.unlock-note.error {
  background: #fff3f3;
  color: #c62828;
  border: 1px solid #f5c2c2;
}
p.tool-hint {
    line-height: 20px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .3px;
    background-position: 16px;
    background-repeat: no-repeat;
    border-radius: 6px;
    text-align: left;
    color: #161616;
    padding: 15px 20px;
    background-color: #def2ff;
    border: 1px solid #008ee9;
    margin: 25px 0px 15px;
}
.option-group.cprotect {
    margin-bottom: 10px;
}.cprotect .input-wrap {
    display: flex;
}
.cprotect .input-wrap input {
    margin: 0px;
    box-shadow: none;
    height: 48px;
    font-size: 14px;
    border-radius: 8px 0px 0px 8px;
    border: 1px solid #0075db;
}
.cprotect .input-wrap button {
    margin: 0px;
    background: #0075db;
    border: 1px solid #0075db;
    display: flex;
    justify-content: center;
    align-items: center;
    fill: white;
    width: 48px;
    height: 48px;
    padding: 0px 23px;
    border-radius: 0px 8px 8px 0px;
}
.option-group.cunlock {
    margin-bottom: 10px;
}.cunlock .input-wrap {
    display: flex;
}
.cunlock .input-wrap input {
    margin: 0px;
    box-shadow: none;
    height: 48px;
    font-size: 14px;
    border-radius: 8px 0px 0px 8px;
    border: 1px solid #0075db;
}
.cunlock .input-wrap button {
    margin: 0px;
    background: #0075db;
    border: 1px solid #0075db;
    display: flex;
    justify-content: center;
    align-items: center;
    fill: white;
    width: 48px;
    height: 48px;
    padding: 0px 23px;
    border-radius: 0px 8px 8px 0px;
}
.cprotect #previewArea, .cremovemeta #previewArea, .ceditmeta #previewArea, .crepair #previewArea, .cflatten #previewArea {
    padding: 0px;
    border: none;
    border-radius: unset;
    background: white;
}
.cprotect #previewArea canvas, .cremovemeta #previewArea canvas, .crepair #previewArea canvas, .ceditmeta #previewArea canvas, .cflatten #previewArea canvas {
    width: 240px;
    margin-bottom: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.cunlock #previewArea {
    padding: 0px;
    border: none;
    border-radius: unset;
    background: white;
    display: flex;
    justify-content: center;
}
.cunlock #previewArea .protect-thumb
 {
    width: 240px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.cunlock #previewArea .protect-thumb .protect-filename {
    bottom: 10px;
    position: absolute;
}
.cunlock #previewArea .protect-thumb img {
    width: 42px !important;
    height: 42px !important;
}
.right.ceditmeta input {
    box-shadow: none;
    border-radius: 4px;
    height: 40px;
    font-size: 13px;
    border: 1px solid #ddd;
    padding: 0px 10px;
    width: 100%;
}
.right.ceditmeta input[type="datetime-local"]:focus {
    outline: none !important;
    box-shadow: none !important;
}