/* FreeToolLabs PDF upload-to-preview enhancement. Scoped to the existing upload zone only. */
.premium-drop-zone.pdf-preview-active {
  padding: 14px;
  cursor: default;
  min-height: 360px;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}
.premium-drop-zone.pdf-preview-active > .pdf-upload-original {
  display: none !important;
}
.pdf-inline-preview-shell {
  display: none;
  width: 100%;
  min-width: 0;
  height: 100%;
  color: #f7f7f4;
  text-align: left;
}
.premium-drop-zone.pdf-preview-active > .pdf-inline-preview-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pdf-preview-toolbar,
.pdf-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pdf-preview-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.pdf-preview-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #ffd400;
  box-shadow: 0 0 0 5px rgba(255, 212, 0, .12), 0 0 18px rgba(255, 212, 0, .42);
}
.pdf-preview-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .93rem;
}
.pdf-preview-heading small,
.pdf-preview-file-meta,
.pdf-preview-page-label {
  color: rgba(255,255,255,.67);
  font-size: .78rem;
}
.pdf-preview-actions,
.pdf-preview-navigation {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pdf-preview-btn {
  appearance: none;
  border: 1px solid rgba(255, 212, 0, .38);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: #fff;
  min-height: 34px;
  padding: 7px 11px;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.pdf-preview-btn:hover,
.pdf-preview-btn:focus-visible {
  border-color: #ffd400;
  background: rgba(255, 212, 0, .1);
  outline: none;
}
.pdf-preview-btn[disabled] {
  opacity: .4;
  cursor: not-allowed;
}
.pdf-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 270px;
  max-height: 460px;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(255, 212, 0, .2);
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%),
    #090a09;
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}
.pdf-preview-stage canvas,
.pdf-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(0,0,0,.55);
}
.pdf-preview-loading,
.pdf-preview-error,
.pdf-preview-document-text,
.pdf-preview-generic-file {
  width: min(100%, 720px);
  margin: auto;
  padding: 26px;
  border-radius: 14px;
  background: rgba(0,0,0,.62);
  color: rgba(255,255,255,.84);
  text-align: center;
}
.pdf-preview-document-text {
  max-height: 390px;
  overflow: auto;
  white-space: pre-wrap;
  text-align: left;
  line-height: 1.55;
}
.pdf-preview-error { color: #ffd6d6; }
.pdf-preview-output-pill {
  display: none;
  border: 1px solid rgba(94, 234, 140, .35);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(34, 197, 94, .1);
  color: #86efac;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pdf-inline-preview-shell.is-output .pdf-preview-output-pill { display: inline-flex; }
.pdf-preview-footer { padding: 0 2px; }
.pdf-preview-footer .pdf-preview-file-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .premium-drop-zone.pdf-preview-active { min-height: 330px; padding: 10px; }
  .pdf-preview-stage { min-height: 235px; max-height: 390px; padding: 9px; }
  .pdf-preview-stage canvas,
  .pdf-preview-stage img { max-height: 350px; }
  .pdf-preview-toolbar { align-items: flex-start; }
  .pdf-preview-actions { width: 100%; justify-content: flex-end; }
}
