/* PDFMoreTools - PDF to Image / Image to PDF tool page
   Scoped styles: these rules are limited to this tool's components. */

.tool-header {
  width: min(100% - 32px, 1160px);
  margin: 0 auto 22px;
  padding: 28px 18px 18px;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tool-header h1 {
  margin: 0 0 8px;
  color: #ed1018;
  font-size: clamp(27px, 3.2vw, 40px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.tool-header h1 i {
  margin-right: 8px;
}

.tool-header p {
  margin: 0;
  color: #6f7782;
  font-size: 15px;
  line-height: 1.6;
}

.tool-instructions,
#mode-grid,
#workbench {
  width: min(100% - 32px, 1160px);
  margin-left: auto;
  margin-right: auto;
}

.tool-instructions {
  margin-bottom: 12px;
}

.tool-instructions details {
  overflow: hidden;
  margin: 0 0 10px;
  padding: 0;
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: 13px;
  box-shadow: 0 2px 7px rgba(30, 41, 59, 0.045);
}

.tool-instructions summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 17px;
  color: #27313f;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

.tool-instructions summary i {
  color: #ed1018;
}

.tool-instructions details ul {
  margin: 0;
  padding: 3px 24px 17px 48px;
  color: #606b78;
  font-size: 14px;
  line-height: 1.9;
}

#mode-grid.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.mode-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 68px;
  padding: 15px 18px;
  color: #394353;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 13px;
  box-shadow: 0 2px 7px rgba(30, 41, 59, 0.04);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.mode-card:hover {
  border-color: #f3a0a3;
  transform: translateY(-1px);
}

.mode-card.active {
  color: #e9000b;
  background: #fff7f7;
  border: 2px solid #ed1018;
  box-shadow: 0 4px 13px rgba(237, 16, 24, 0.08);
}

.mode-card.disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.mode-card .mode-icon {
  font-size: 22px;
  color: #ed1018;
}

.mode-card .mode-title {
  font-size: 16px;
  font-weight: 750;
}

#workbench.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 22px;
  margin-bottom: 36px;
}

#dropzone.dropzone,
#dropzone.upload-zone {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 285px;
  padding: 38px 22px;
  text-align: center;
  background: #fff;
  border: 2px dashed #dce2e9;
  border-radius: 15px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

#dropzone.drag-over {
  background: #fff8f8;
  border-color: #ed1018;
  box-shadow: 0 0 0 4px rgba(237, 16, 24, .06);
}

#dropzone .dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin-bottom: 11px;
  color: #ed1018;
  font-size: 43px;
}

#dropzone .dropzone-title {
  margin: 0 0 5px;
  color: #171b22;
  font-size: 23px;
  line-height: 1.3;
  font-weight: 750;
}

#dropzone .dropzone-text {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 15px;
}

.btn-primary,
#convert-btn,
#dropzone .upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 11px 25px;
  color: #fff;
  background: #ed1018;
  border: 1px solid #ed1018;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn-primary:hover,
#convert-btn:hover:not(:disabled),
#dropzone .upload-btn:hover {
  background: #ce0710;
  border-color: #ce0710;
  box-shadow: 0 5px 13px rgba(237, 16, 24, .17);
  transform: translateY(-1px);
}

#convert-btn:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

#batch-queue {
  grid-column: 1;
  min-width: 0;
}

.pmt-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
}

.pmt-queue-heading h3 {
  margin: 0;
  color: #222b37;
  font-size: 17px;
  font-weight: 750;
}

.pmt-queue-heading h3 i {
  margin-right: 7px;
  color: #ed1018;
}

.pmt-queue-heading > span {
  color: #737d89;
  font-size: 13px;
}

.pmt-file-list {
  display: grid;
  gap: 9px;
}

.pmt-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
}

.pmt-file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: #ed1018;
  background: #fff0f0;
  border-radius: 9px;
  font-size: 19px;
}

.pmt-file-info,
.pmt-result-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.pmt-file-info strong,
.pmt-result-info strong {
  overflow: hidden;
  color: #293241;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmt-file-info small,
.pmt-result-info small {
  color: #7a8491;
  font-size: 12px;
}

.pmt-remove-file {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #7c8794;
  background: #f5f6f8;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.pmt-remove-file:hover {
  color: #ed1018;
  background: #fff0f0;
}

#workbench .sidebar {
  grid-column: 2;
  grid-row: 2 / span 2;
  min-width: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(30, 41, 59, .045);
}

#workbench .sidebar h3 {
  margin: 0 0 20px;
  color: #ed1018;
  font-size: 19px;
  font-weight: 750;
}

#workbench .sidebar h3 i {
  margin-right: 6px;
}

#workbench .sidebar-group {
  display: grid;
  gap: 9px;
  margin-bottom: 17px;
}

#workbench .sidebar-group label {
  color: #303a48;
  font-size: 13px;
  font-weight: 700;
}

#workbench .sidebar-group label i {
  margin-right: 5px;
  color: #707b88;
}

#workbench .sidebar-group select {
  width: 100%;
  min-height: 43px;
  padding: 9px 12px;
  color: #303a48;
  background: #fff;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  font-size: 14px;
  outline: none;
}

#workbench .sidebar-group select:focus {
  border-color: #ed1018;
  box-shadow: 0 0 0 3px rgba(237, 16, 24, .08);
}

#workbench #convert-btn {
  width: 100%;
  margin-top: 8px;
}

#progress-container {
  overflow: hidden;
  width: 100%;
  height: 9px;
  margin: 16px 0 4px;
  background: #f0f1f3;
  border-radius: 20px;
}

#progress-fill {
  width: 0;
  height: 100%;
  background: #ed1018;
  border-radius: inherit;
  transition: width .2s ease;
}

#result-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.pmt-result-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 11px;
  box-shadow: 0 2px 7px rgba(30, 41, 59, .035);
}

.pmt-result-preview {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
  background: #f6f7f9;
  border: 1px solid #edf0f3;
  border-radius: 7px;
}

.pmt-result-file-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: #ed1018;
  background: #fff0f0;
  border-radius: 8px;
  font-size: 25px;
}

.pmt-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 13px;
  color: #fff;
  background: #ed1018;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.pmt-download-btn:hover {
  color: #fff;
  background: #ce0710;
}

.pmt-message {
  grid-column: 1 / -1;
  padding: 12px 15px;
  color: #344054;
  background: #f5f7fa;
  border: 1px solid #e3e8ef;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.5;
}

.pmt-message.success {
  color: #17643b;
  background: #effaf3;
  border-color: #ccebd7;
}

.pmt-message.error {
  color: #a21b24;
  background: #fff2f2;
  border-color: #f4c9cc;
}

@media (max-width: 760px) {
  .tool-header {
    padding-top: 22px;
  }

  #workbench.workbench {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  #dropzone.dropzone,
  #dropzone.upload-zone {
    min-height: 245px;
    padding: 30px 16px;
  }

  #workbench .sidebar {
    grid-column: 1;
    grid-row: auto;
  }

  #batch-queue,
  #result-list {
    grid-column: 1;
  }

  .mode-card {
    min-height: 62px;
    padding: 12px 9px;
    gap: 8px;
  }

  .mode-card .mode-title {
    font-size: 14px;
  }
}

@media (max-width: 460px) {
  .tool-instructions,
  #mode-grid,
  #workbench,
  .tool-header {
    width: min(100% - 22px, 1160px);
  }

  .tool-header h1 {
    font-size: 25px;
  }

  .tool-header p {
    font-size: 13px;
  }

  #mode-grid.mode-grid {
    gap: 8px;
  }

  .mode-card {
    flex-direction: column;
    gap: 5px;
    min-height: 75px;
  }

  #dropzone .dropzone-title {
    font-size: 20px;
  }

  .pmt-result-item {
    flex-wrap: wrap;
  }

  .pmt-result-info {
    min-width: calc(100% - 75px);
  }

  .pmt-download-btn {
    margin-left: auto;
  }
}
