/* PDF tool UI (hero, upload, editor overlays, modal) */
.drop-zone {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.drop-zone.drag-over .upload-inner {
  border-color: #94a3b8;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12) inset;
}
.hero-wrap {
  position: relative;
}
.hero-content {
  animation: heroIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-content-delay {
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.1s;
}
@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.upload-shell {
  position: relative;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, #cbd5e1, #e2e8f0 45%, #f1f5f9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 22px 44px -12px rgba(15, 23, 42, 0.1),
    0 8px 16px -6px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease;
}
.upload-shell:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 28px 56px -12px rgba(15, 23, 42, 0.12),
    0 12px 24px -8px rgba(15, 23, 42, 0.06);
}
.upload-card {
  background: #fff;
  border-radius: 23px;
  overflow: hidden;
}
.upload-inner {
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  padding: 1.25rem 1rem 1.25rem;
  margin: 10px;
  transition:
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}
@media (min-width: 640px) {
  .upload-inner {
    padding: 2rem 1.75rem 1.75rem;
    margin: 14px;
  }
}
@media (min-width: 768px) {
  .upload-inner {
    padding: 2.25rem 2rem 2rem;
  }
}
.upload-btn {
  position: relative;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 4px 6px -1px rgba(220, 38, 38, 0.4),
    0 14px 28px -6px rgba(220, 38, 38, 0.45);
  transition:
    transform 0.2s,
    filter 0.2s,
    box-shadow 0.2s;
}
.upload-btn:hover {
  filter: brightness(1.05);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 6px 12px -2px rgba(220, 38, 38, 0.5),
    0 18px 36px -8px rgba(220, 38, 38, 0.5);
  transform: translateY(-1px);
}
.hero-benefits {
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 250, 252, 0.65) 100%);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px -8px rgba(15, 23, 42, 0.08);
  padding: 6px;
  overflow: hidden;
}
.hero-benefit {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  transition: background 0.2s ease;
}
.hero-benefit + .hero-benefit {
  border-top: 1px solid rgba(241, 245, 249, 0.95);
}
.hero-benefit:hover {
  background: rgba(255, 255, 255, 0.75);
}
.hero-benefit-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 8px -2px rgba(220, 38, 38, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}
.trust-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 6px 12px;
}
.page-wrap {
  position: relative;
  display: inline-block;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  overflow: visible;
  cursor: crosshair;
  max-width: 100%;
}
.cursor-tip {
  position: fixed;
  pointer-events: none;
  z-index: 55;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.page-label {
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 3;
}
.sig-overlay {
  position: absolute;
  cursor: move;
  user-select: none;
  touch-action: none;
  border: 2px dashed transparent;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.sig-overlay:hover,
.sig-overlay.active {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.sig-overlay img {
  pointer-events: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sig-resize {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 2px;
  cursor: nwse-resize;
  z-index: 2;
  display: none;
}
.sig-delete {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s;
}
.sig-overlay:hover .sig-delete,
.sig-overlay.active .sig-delete {
  opacity: 1;
}
.sig-overlay:hover .sig-resize,
.sig-overlay.active .sig-resize {
  display: block;
}
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px;
}
.modal-bg.show {
  opacity: 1;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 0;
  max-width: 720px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  transform: translateY(16px);
  transition: transform 0.2s;
  overflow: hidden;
  max-height: min(90dvh, 900px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-bg.show .modal-box {
  transform: translateY(0);
}
@media (max-width: 767px) {
  .modal-bg {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-box {
    border-radius: 1rem 1rem 0 0;
    max-height: min(92dvh, 100%);
    max-width: 100%;
  }
  .upload-shell:hover {
    transform: none;
  }
}
.hint-toast {
  position: fixed;
  bottom: max(88px, calc(88px + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: hintIn 0.3s ease;
  max-width: calc(100vw - 24px);
  text-align: center;
  justify-content: center;
}
@keyframes hintIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Mobile nav drawer */
@media (max-width: 767px) {
  body.nav-drawer-open {
    overflow: hidden;
    touch-action: none;
  }
}

.editor-bar-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Mobile refinements */
@media (max-width: 639px) {
  .upload-shell {
    border-radius: 18px;
  }
  .upload-card {
    border-radius: 17px;
  }
  .upload-inner {
    border-radius: 14px;
    margin: 8px;
  }
  .hero-benefit-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .hero-benefit {
    gap: 12px;
    padding: 12px 12px;
  }
  .hero-benefits {
    border-radius: 14px;
    padding: 4px;
  }
  .trust-pill {
    font-size: 10px;
    padding: 5px 10px;
  }
  #vorteile article,
  #vertrauen .grid > div {
    text-align: center;
  }
  #vorteile article > div:first-child,
  #vertrauen .grid > div > div:first-child {
    margin-inline: auto;
  }
  body.pdf-editing footer,
  body.pdf-editing #so-gehts,
  body.pdf-editing #vorteile,
  body.pdf-editing #vertrauen,
  body.pdf-editing #faq {
    display: none;
  }
}
