/* ==========================================================
 * SPEISEKARTEN – Vorschau (erste PDF-Seite), Lightbox und Drucklink
 * Plugin: Die Internette – Speisekartenverwaltung v1.6.2
 * ========================================================== */
.di-pdf {
  display: block !important;
  float: none !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 660px;
  margin-inline: auto !important;
}
.di-pdf__embed {
  position: relative;
  width: 100%;
  height: auto;
  background: #fff;
  overflow: visible;
}
.di-pdf__preview {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--di-sk-button-bg, #E2B6C7);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
/* Sicherheits-Fallback (nur bei nicht verfügbarer JPG-Erzeugung):
 * Das aktuelle PDF bleibt sichtbar. Die seitlichen dunklen Bereiche
 * der integrierten Browser-PDF-Anzeige werden mit einem dezenten
 * weißen Rand maskiert; der eigentliche PDF-Inhalt bleibt sichtbar.
 * Diese Maskierung ist browserabhängig und nicht die JPG-Hauptlösung. */
.di-pdf__preview-fallback {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1 / 1.414;
  overflow: hidden;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--di-sk-button-bg, #E2B6C7);
  box-shadow: none;
}
.di-pdf__preview-live {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: #fff;
}
/* Cover the default black side bands of Chromium's built-in viewer.
 * On mobile <600px, the entire preview is hidden as before. */
.di-pdf__preview-fallback::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #fff 0 7.5%, transparent 7.5% 92.5%, #fff 92.5% 100%);
  pointer-events: none;
}
.di-pdf__placeholder {
  padding: 96px 20px 70px;
  background: #f8f6f5;
  border: 1px solid #dfd3cf;
  text-align: center;
  color: #3A1B0B;
}
/* ==========================================================
 * SPEISEKARTEN – Button „Groß ansehen“ / Backend-Farbvariablen
 * ========================================================== */
.di-pdf .di-pdf__embed > button.di-pdf__zoom {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 1;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 9px 14px !important;
  background: var(--di-sk-button-bg, #E2B6C7) !important;
  background-image: none !important;
  color: var(--di-sk-button-text, #3A1B0B) !important;
  border: 1px solid var(--di-sk-button-text, #3A1B0B) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.di-pdf .di-pdf__embed > button.di-pdf__zoom:hover,
.di-pdf .di-pdf__embed > button.di-pdf__zoom:focus-visible {
  background: var(--di-sk-button-hover-bg, #D7A6B8) !important;
  background-image: none !important;
  color: var(--di-sk-button-text, #3A1B0B) !important;
}
.di-pdf .di-pdf__embed > button.di-pdf__zoom:focus-visible {
  outline: 2px solid var(--di-sk-button-text, #3A1B0B);
  outline-offset: 2px;
}
.di-pdf__date {
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
  color: #65574e;
}
.di-pdf__link { margin: 8px 0 24px; text-align: center; }
/* ==========================================================
 * SPEISEKARTEN – PDF-Link / Backend-Farbvariablen
 * ========================================================== */
.di-pdf .di-pdf__link a {
  display: inline-block;
  padding: 10px 16px;
  background: var(--di-sk-button-bg, #E2B6C7);
  color: var(--di-sk-button-text, #3A1B0B) !important;
  border: 1px solid var(--di-sk-button-text, #3A1B0B);
  border-radius: 4px;
  text-decoration: none !important;
  font-size: 15px;
  line-height: 1.45;
}
.di-pdf .di-pdf__link a:hover,
.di-pdf .di-pdf__link a:focus-visible {
  background: var(--di-sk-button-hover-bg, #D7A6B8);
  color: var(--di-sk-button-text, #3A1B0B) !important;
}
.di-pdf .di-pdf__link a:focus-visible {
  outline: 2px solid var(--di-sk-button-text, #3A1B0B);
  outline-offset: 2px;
}
/* ==========================================================
 * SPEISEKARTEN – PDF-Großansicht (Browser-PDF), X oberhalb Toolbar
 * ========================================================== */
.di-pdf__overlay[hidden] { display: none !important; }
.di-pdf__overlay {
  position: fixed; inset: 0; z-index: 100001;
  display: grid; place-items: center; padding: 54px 3vw 16px;
  background: rgba(18, 12, 9, .86);
}
.di-pdf__dialog {
  width: min(1250px, 94vw);
  height: calc(100vh - 70px);
  height: calc(100dvh - 70px);
  position: relative;
  background: white;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .36);
}
.di-pdf__dialog iframe { display: block; width: 100%; height: 100%; border: 0; }
.di-pdf__overlay .di-pdf__dialog > button.di-pdf__close {
  position: absolute !important;
  top: -46px !important;
  right: 0 !important;
  z-index: 2;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.35) !important;
  border-radius: 4px !important;
  background: #3A1B0B !important;
  background-image: none !important;
  color: #fff !important;
  font-family: Arial, sans-serif !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
}
.di-pdf__overlay .di-pdf__dialog > button.di-pdf__close:hover,
.di-pdf__overlay .di-pdf__dialog > button.di-pdf__close:focus-visible {
  background: #563321 !important;
  color: #fff !important;
  border-color: #fff !important;
}
.di-pdf__overlay .di-pdf__dialog > button.di-pdf__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* ==========================================================
 * SPEISEKARTEN – Responsive Zentrierung und Vorschau
 * Desktop ab 1025: 660 px, Tablet 768–1024: 580 px,
 * Mobil quer 600–767: 460 px, bis 599: nur PDF-Link
 * ========================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
  .di-pdf { max-width: 580px; }
}
@media (min-width: 600px) and (max-width: 767px) {
  .di-pdf { max-width: 460px; }
  .di-pdf .di-pdf__embed > button.di-pdf__zoom { padding: 8px 10px !important; font-size: 13px !important; }
}
@media (max-width: 599px) {
  .di-pdf__embed { display: none !important; }
}
@media print {
  .di-pdf__overlay, .di-pdf__zoom { display: none !important; }
}
