/* PDF-Links: Popover „View / Download“ mit Vorschau (redd_portal/assets/js/redd-pdf-links.js, übernommen von HAGE) und Fenster mit dem PDFOut-Viewer */
.redd-pdfpop {
  position: absolute;
  z-index: 1000;
  box-sizing: border-box;
  width: max-content;
  max-width: min(20rem, calc(100vw - 24px));
  padding: 14px 16px;
  border: 1px solid #d5dcda;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1c;
  box-shadow: 0 14px 40px rgb(0 0 0 / 18%), 0 2px 6px rgb(0 0 0 / 8%);
}
.redd-pdfpop.has-thumb { display: flex; align-items: flex-start; gap: 14px; max-width: min(24rem, calc(100vw - 24px)); }
.redd-pdfpop__thumb {
  flex: none;
  width: 72px;
  height: 102px;
  overflow: hidden;
  border-radius: 3px;
  background: #f2f8f7;
  box-shadow: 0 3px 10px rgb(0 0 0 / 18%);
}
.redd-pdfpop__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.redd-pdfpop__thumb.is-landscape { width: 108px; height: 76px; }
.redd-pdfpop__body { min-width: 0; }
.redd-pdfpop__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.3;
}
.redd-pdfpop__meta { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 0.85rem; color: #4a5560; }
.redd-pdfpop__badge {
  padding: 1px 5px;
  border-radius: 3px;
  background: #b3261e;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.redd-pdfpop__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.redd-pdfpop__title { font-weight: 600; color: #19796c; }
.redd-pdf-close:focus-visible, .redd-pdfpop :focus-visible { outline: 3px solid #f5c400; outline-offset: 2px; }
@media (max-width: 30rem) {
  .redd-pdfpop.has-thumb { gap: 12px; }
  .redd-pdfpop__thumb { width: 56px; height: 80px; }
  .redd-pdfpop__thumb.is-landscape { width: 84px; height: 59px; }
  .redd-pdfpop__actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: no-preference) {
  .redd-pdfpop.is-below { animation: redd-pdfpop-down 0.18s ease-out both; }
  .redd-pdfpop.is-above { animation: redd-pdfpop-up 0.18s ease-out both; }
}
@keyframes redd-pdfpop-down { from { opacity: 0; translate: 0 -6px; } }
@keyframes redd-pdfpop-up { from { opacity: 0; translate: 0 6px; } }

/* Fenster mit dem Viewer */
.redd-pdf-dialog {
  width: min(94vw, 72rem);
  height: 92vh;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #2b2b2b;
  color: #f2f2f2;
  overflow: visible;
}
.redd-pdf-dialog[open] { display: flex; flex-direction: column; }
.redd-pdf-dialog::backdrop { background: rgb(0 0 0 / 0.82); }
.redd-pdf-caption {
  flex: none;
  margin: 0;
  padding: 0.6rem 3.2rem 0.6rem 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.redd-pdf-frame { flex: 1; width: 100%; border: 0; border-radius: 0 0 6px 6px; background: #525659; }
.redd-pdf-close {
  position: absolute;
  inset-block-start: -0.9rem;
  inset-inline-end: -0.9rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  box-shadow: 0 4px 14px rgb(0 0 0 / 30%);
}
.redd-pdf-close svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 40rem) {
  .redd-pdf-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .redd-pdf-frame { border-radius: 0; }
  .redd-pdf-close { inset-block-start: 0.25rem; inset-inline-end: 0.4rem; }
}
