/* ===========================================================
   MELDO PDF ANNOTATOR – LIGHT THEME (v1.8.0)
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Akko:wght@500;600&family=Funnel+Sans:wght@400;500&display=swap');

/* ---------- Grundfarben & Schrift ---------- */
:root {
  --meldo-bg: #ffffff;
  --meldo-panel: #fafafa;
  --meldo-border: #d0d7de;
  --meldo-primary: #3D7C85;
  --meldo-secondary: #E8924F;
  --meldo-text: #1A1A1A;
  --meldo-muted: #6b6b6b;
  font-family: 'Akko', sans-serif;
}

/* ---------- Grundcontainer ---------- */
/* v2.0.3 ACTIVE */
.meldo-pdf-wrapper {
  background: var(--meldo-bg);
  color: var(--meldo-text);
  border: 1px solid var(--meldo-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: var(--meldo-pdf-height, 800px);
  font-family: 'Akko', sans-serif;
  position: relative;
}

.meldo-pdf-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 0.25s ease;
}

.meldo-pages {
  position: relative;
  overflow: auto;
  background: #fff;
  padding: 16px;
}

/* ===========================================================
   Meldo Toolbar v3.0 – Mode-Pill Single-Line
   =========================================================== */
.meldo-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
  border-bottom: 1px solid var(--meldo-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: 'Akko', sans-serif;
}

/* Left / Center / Right areas */
.meldo-tb-left,
.meldo-tb-right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.meldo-tb-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
  gap: 6px;
}

/* Row 1 stays single-line: left + center(pills) + right */
.meldo-tb-left, .meldo-tb-center, .meldo-tb-right {
  order: 0;
}

/* Mode tools panel: full-width second row */
.meldo-mode-expand {
  display: none;
  width: 100%;
  order: 1;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 4px 2px 2px;
  border-top: 1px solid rgba(0,0,0,0.06);
  animation: meldo-slide-down 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.meldo-mode-expand.is-open {
  display: flex;
}

@keyframes meldo-slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mode Pills container */
.meldo-mode-pills {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f0f1f2;
  border-radius: 20px;
  padding: 2px;
  flex-shrink: 0;
}

/* Individual pill */
.meldo-pill {
  border: none;
  background: transparent;
  color: var(--meldo-muted);
  border-radius: 16px;
  height: 28px;
  min-width: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  gap: 4px;
}
.meldo-pill:hover {
  background: rgba(61,124,133,0.1);
  color: var(--meldo-primary);
}
.meldo-pill.is-active {
  background: var(--meldo-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(61,124,133,0.3);
}

/* Back pill */
.meldo-pill-back {
  padding: 0 5px;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #f0f1f2;
}
.meldo-pill-back:hover {
  background: #e0e1e2;
}

/* Pill text labels: hidden on mobile, visible on desktop */
.meldo-pill-label {
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  font-size: 12px;
}

/* Pen color indicator dot */
.meldo-pen-color-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2);
  pointer-events: none;
}

/* Desktop-actions: always visible on desktop */
.meldo-desktop-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Actions pill: only on mobile */
.meldo-pill-mobile-only {
  display: inline-flex;
}

/* ===== Compact mode (auto-detected by JS or narrow screens) ===== */
.meldo-pdf-wrapper.meldo-compact .meldo-pill-label { display: none; }
.meldo-pdf-wrapper.meldo-compact .meldo-desktop-actions { display: none; }
.meldo-pdf-wrapper.meldo-compact .meldo-pill-mobile-only { display: inline-flex; }

/* Fallback media query for initial load before JS runs */
@media (max-width: 768px) {
  .meldo-pill-label { display: none; }
  .meldo-desktop-actions { display: none; }
  .meldo-pill-mobile-only { display: inline-flex; }
}
.meldo-mode-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.meldo-mode-tools[hidden] { display: none !important; }


/* ---------- Buttons ---------- */
.meldo-btn {
  border: 1px solid var(--meldo-border);
  background: #fff;
  color: var(--meldo-text);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
  padding: 0;
}

.meldo-btn-sm {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  position: relative;
}

/* SVG Icons in Buttons */
.meldo-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.meldo-btn:hover {
  background: var(--meldo-primary);
  border-color: var(--meldo-primary);
  color: #fff;
  transform: translateY(-1px);
}

.meldo-btn:hover svg {
  stroke: #fff;
}

/* ---------- Aktive Buttons ---------- */
.meldo-btn.is-active,
.meldo-btn.active {
  background: var(--meldo-secondary) !important;
  border-color: var(--meldo-secondary) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transform: none !important;
}

.meldo-btn.is-active:hover {
  transform: scale(1.05);
}

/* ---------- Danger / Primary ---------- */
.meldo-btn.is-danger {
  background: #fff5f5;
  border-color: #f0c2c2;
  color: #b80000;
}
.meldo-btn.is-primary {
  background: var(--meldo-primary);
  border-color: var(--meldo-primary);
  color: #fff;
}

/* ---------- Page Input & Zoom ---------- */
.meldo-page-input {
  width: 40px;
  height: 26px;
  background: #fff;
  color: var(--meldo-text);
  border: 1px solid var(--meldo-border);
  border-radius: 6px;
  padding: 0 4px;
  text-align: center;
  font-size: 12px;
  font-family: 'Akko', sans-serif;
  font-weight: 600;
}

.meldo-page-total {
  font-size: 12px;
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  opacity: 0.6;
  white-space: nowrap;
}

.meldo-zoom {
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  font-size: 12px;
  opacity: 0.8;
  min-width: 36px;
  text-align: center;
}

/* (toolbar-break removed in v3) */

/* ---------- Farbauswahl-Button ---------- */
.meldo-btn.meldo-color-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--meldo-text) !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.meldo-btn.meldo-color-btn:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

.meldo-pen-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ---------- Hauptlayout ---------- */
/* (defined above in Grundcontainer section) */

/* Wenn die Thumbnails versteckt sind */
.meldo-pdf-body.thumbs-hidden {
  grid-template-columns: 0 1fr;
}

.meldo-thumbs {
  overflow: auto;
  border-right: 1px solid var(--meldo-border);
  background: #f9f9f9;
  padding: 8px;
  transition: width 0.25s ease, opacity 0.25s ease;
}

.meldo-thumbs.hidden {
  width: 0;
  opacity: 0;
  pointer-events: none;
  padding: 0;
  border: none;
}


.meldo-thumb {
  margin-bottom: 10px;
  border: 1px solid var(--meldo-border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease;
}
.meldo-thumb:hover {
  border-color: var(--meldo-primary);
}
.meldo-thumb canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- PDF-Seitenbereich ---------- */
/* (defined above in Grundcontainer section) */

.meldo-page-wrap {
  position: relative;
  margin: 0 auto 16px;
  display: inline-block;
  background: #fff;
  border: 1px solid var(--meldo-border);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  /* v2.9.2: kappt Textlayer-/Notiz-Überhang. Ohne dies vergrössert
     jedes Element, das über den Seitenrand hinausragt, den
     Scrollbereich – daraus entstand die weisse Fläche nach der
     letzten Seite. */
  overflow: hidden;
}
.meldo-page-wrap:last-child {
  margin-bottom: 0;
}

.meldo-page-canvas,
.meldo-anno-canvas {
  display: block;
}


.meldo-anno-canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

/* ---------- Text-Layer (für PDF.js Text) ---------- */
.meldo-text-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  color: transparent;
  mix-blend-mode: multiply;
}
.meldo-text-layer > div {
  position: absolute;
  white-space: pre;
  transform-origin: 0 0;
  color: #000;
  font-family: 'Akko', sans-serif;
}

/* ---------- Textboxen (User-Notizen) ---------- */
.meldo-textbox {
  position: absolute;
  min-width: 40px;
  min-height: 24px;
  border: 1px dashed var(--meldo-secondary);
  background: rgba(232, 146, 79, 0.15);
  color: var(--meldo-text);
  padding: 4px 6px;
  border-radius: 4px;
  outline: none;
  cursor: text;
  font-family: 'Akko', sans-serif;
}
.meldo-textbox[data-selected="true"] {
  border-style: solid;
}

/* ---------- Toast-Meldung ---------- */
.meldo-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  background: var(--meldo-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.meldo-toast[hidden] {
  opacity: 0;
  transform: translate(-50%, -10px);
}

.meldo-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ---------- Zoom & Animation ---------- */
.meldo-page-wrap { transition: transform 0.25s ease; }

/* ---------- Scrollbar (optional schön) ---------- */
.meldo-pages::-webkit-scrollbar,
.meldo-thumbs::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.meldo-pages::-webkit-scrollbar-thumb,
.meldo-thumbs::-webkit-scrollbar-thumb {
  background: var(--meldo-primary);
  border-radius: 6px;
}
.meldo-pages::-webkit-scrollbar-track,
.meldo-thumbs::-webkit-scrollbar-track {
  background: #eee;
}

.meldo-page-wrap { transition: transform 0.25s ease; }

/* Download-Link (mit "download"-Attribut) ausblenden */
.meldo-pdf-toolbar a[download] {
  display: none !important;
}

/* (v1.6 toolbar overrides removed in v3.0) */

/* ===========================================================
   🔧 Hover-Fix für Primary (Save) + Danger (Delete)
   =========================================================== */

/* Basis: keine Verschiebung, nur saubere Transition vorbereiten */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-primary,
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-danger {
  transform: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

/* Save (primary) – Farbe bleibt, nur Scale bei Hover */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-primary {
  background: var(--meldo-primary);
  border-color: var(--meldo-primary);
  color: #fff;
}
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-primary:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  background: var(--meldo-primary);
  border-color: var(--meldo-primary);
  color: #fff;
}

/* Delete (danger) – Farbe bleibt, nur Scale bei Hover */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-danger {
  background: #fff5f5;
  border-color: #f0c2c2;
  color: #b80000;
}
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-danger:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 3px 8px rgba(166,0,0,0.25);
  background: #fff5f5;
  border-color: #f0c2c2;
  color: #b80000;
}

/* Sicherheit: Jegliche Theme-Hover-Transforms neutralisieren */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-primary:hover,
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn.is-danger:hover {
  translate: 0 !important;
}

.meldo-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--meldo-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  font-family: 'Akko', sans-serif;
  font-size: 15px;
  font-weight: 600;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.meldo-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(5px);
}

/* ===========================================================
   💬 Einheitliche Tooltips – unten, klein & dezent
   =========================================================== */

.meldo-btn[title],
a.meldo-btn[title] {
  position: relative;
}

/* Tooltip nach unten, kleine Schrift */
.meldo-btn[title]:hover::after,
a.meldo-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: 120%; /* nach unten ausgerichtet */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(25, 25, 25, 0.9);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px; /* kleiner & einheitlich */
  font-family: 'Akko', sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  line-height: 1.2;
  animation: meldo-tooltip-fade 0.15s ease-out;
}

/* Animation */
@keyframes meldo-tooltip-fade {
  from { opacity: 0; transform: translateX(-50%) translateY(-3px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ===========================================================
   🔹 Aktive Buttons farblich hervorheben (#E8924F)
   =========================================================== */
.meldo-btn.is-active,
.meldo-btn.active {
  background: var(--meldo-secondary) !important; /* #E8924F */
  border-color: var(--meldo-secondary) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: none !important;
}

.meldo-btn.is-active:hover,
.meldo-btn.active:hover {
  background: var(--meldo-secondary) !important;
  border-color: var(--meldo-secondary) !important;
  color: #fff !important;
  transform: scale(1.05);
}

.meldo-marker-color {
  appearance: none !important;
  background: #fff !important;
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
  font-size: 13px !important;
  margin-left: 6px !important;
  cursor: pointer !important;
  color: #333 !important;
  transition: all 0.2s ease !important;
}
.meldo-marker-color:hover {
  background: #f5f5f5 !important;
}

/* === Marker Popup Menü (Meldo Style) === */
.meldo-marker-menu {
  position: relative;
  display: inline-block;
}

.meldo-marker-popup {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Wenn das Popup sichtbar ist */
.meldo-marker-popup[hidden=false],
.meldo-marker-popup:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Farbpunkte */
.meldo-marker-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.meldo-marker-dot:hover {
  transform: scale(1.2);
  border-color: #3D7C85;
}

/* Aktive Farbe (kurz visuell hervorgehoben beim Klick) */
.meldo-marker-dot:active {
  transform: scale(1.1);
  border-color: #E8924F;
}

/* Popup-Pfeil nach oben */
.meldo-marker-popup::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
  filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.1));
}


/* === Pen Controls rechts vom Stift-Button === */
.meldo-pen-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.meldo-pen-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding-left: 6px;
}

.meldo-pen-controls label {
  font-size: 12px;
  color: var(--meldo-muted);
}

.meldo-pen-controls input[type="range"] {
  width: 80px;
  accent-color: var(--meldo-primary);
}

.meldo-pen-controls input[type="color"] {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* === Fix: Pen Controls sichtbar nur wenn aktiv === */
.meldo-pen-controls[hidden] {
  display: none !important;
}

.meldo-pen-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  transition: opacity 0.25s ease;
  opacity: 1;
}

/* Für weiches Ein-/Ausblenden */
.meldo-pen-controls.fade-out {
  opacity: 0;
}

/* ===========================================================
   🔹 Toolbar: Neue Zeile nach Textfeld
   =========================================================== */
.meldo-toolbar-break {
  flex-basis: 100%;
  height: 0;
}

.meldo-draw-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* ===========================================================
   🎨 Meldo Color Button – ohne Hintergrund, ohne Rand
   =========================================================== */

.meldo-btn.meldo-color-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--meldo-text) !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Hover leicht vergrößern, aber kein Hintergrund */
.meldo-btn.meldo-color-btn:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

/* Der Farbwähler selbst bleibt unsichtbar */
.meldo-pen-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===========================================================
   ✨ Fix: Sichtbare Icons auf gefärbtem Button-Hintergrund
   =========================================================== */

/* Normaler Hover → Hintergrund wird türkis, Icon wird weiss */
.meldo-btn:hover {
  background: var(--meldo-primary) !important;
  border-color: var(--meldo-primary) !important;
  color: #fff !important;
}

.meldo-btn:hover svg {
  stroke: #fff !important;
}

/* Aktive Buttons */
.meldo-btn.is-active,
.meldo-btn.active {
  color: #fff !important;
}

.meldo-btn.is-active svg,
.meldo-btn.active svg {
  stroke: #fff !important;
}

/* Primary Button (Speichern) */
.meldo-btn.is-primary svg {
  stroke: #fff !important;
}

.meldo-btn.is-primary:hover svg {
  stroke: #fff !important;
}

/* Danger Button (Löschen) - behält rote Farbe bis Hover */
.meldo-btn.is-danger svg {
  stroke: #b80000 !important;
}

.meldo-btn.is-danger:hover {
  background: #b80000 !important;
  border-color: #b80000 !important;
  color: #fff !important;
}

.meldo-btn.is-danger:hover svg {
  stroke: #fff !important;
}


/* ===========================================================
   💬 Tooltip-Fix v3 – Kleine Schrift + oben für Save/Delete
   =========================================================== */

.meldo-pdf-toolbar .meldo-btn[title],
.meldo-pdf-toolbar a.meldo-btn[title] {
  position: relative !important;
}

/* Einheitliche kleine Schrift für alle Tooltips */
.meldo-pdf-toolbar .meldo-btn[title]::after,
.meldo-pdf-toolbar a.meldo-btn[title]::after {
  font-size: 10px !important;
  line-height: 1.2 !important;
  font-family: 'Akko', sans-serif !important;
}

/* 🔽 Standard: Tooltip nach unten (alle normalen Buttons) */
.meldo-pdf-toolbar .meldo-btn[title]:hover::after,
.meldo-pdf-toolbar a.meldo-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(25, 25, 25, 0.9);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  z-index: 99999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  animation: meldo-tooltip-fade-down 0.15s ease-out;
  font-size: 10px !important;
}

/* 🔼 Ausnahme: Speichern (is-primary) & Alles löschen (is-danger) → Tooltip nach oben */
.meldo-pdf-toolbar .meldo-btn.is-primary[title]:hover::after,
.meldo-pdf-toolbar .meldo-btn.is-danger[title]:hover::after {
  top: auto !important;
  bottom: 120% !important;
  transform: translateX(-50%) !important;
  animation: meldo-tooltip-fade-up 0.15s ease-out !important;
}

/* Pfeile für beide Richtungen */
.meldo-pdf-toolbar .meldo-btn[title]:hover::before,
.meldo-pdf-toolbar a.meldo-btn[title]:hover::before {
  content: '';
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(25,25,25,0.9) transparent transparent transparent;
}

.meldo-pdf-toolbar .meldo-btn.is-primary[title]:hover::before,
.meldo-pdf-toolbar .meldo-btn.is-danger[title]:hover::before {
  top: auto !important;
  bottom: 115% !important;
  border-color: transparent transparent rgba(25,25,25,0.9) transparent !important;
}

/* sanfte Animationen */
@keyframes meldo-tooltip-fade-down {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes meldo-tooltip-fade-up {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}




/* ===========================================================
   📱 Meldo Toolbar – Responsive (compact mode)
   =========================================================== */

/* Compact class (set by ResizeObserver) */
.meldo-pdf-wrapper.meldo-compact .meldo-pdf-toolbar {
  padding: 5px 6px;
  gap: 3px;
}
.meldo-pdf-wrapper.meldo-compact .meldo-page-input,
.meldo-pdf-wrapper.meldo-compact .meldo-page-total {
  display: none;
}
.meldo-pdf-wrapper.meldo-compact .meldo-pages {
  padding: 4px;
}

/* Fallback media queries for initial load */
@media (max-width: 600px) {
  .meldo-pdf-toolbar {
    padding: 5px 6px;
    gap: 3px;
  }
  .meldo-page-input,
  .meldo-page-total {
    display: none;
  }
  .meldo-mode-expand.is-open {
    padding: 5px 2px 3px;
  }
}

@media (max-width: 768px) {
  .meldo-pages {
    padding: 4px;
  }
}


/* Touch-Gesten: standardmäßig normales Scrollen erlauben */
/* v2.9.4: kein overscroll-behavior:contain – am oberen bzw. unteren
   Anschlag soll das Scrollen auf die WordPress-Seite übergehen,
   damit man aus dem PDF heraus weiterscrollen kann. */
.meldo-pages { touch-action: pan-x pan-y; overscroll-behavior: auto; }

/* During pinch: GPU-beschleunigt */
.meldo-pages.pinch-active { 
  touch-action: none;
  overflow: hidden;
}
.meldo-pages-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 0 0;
  flex: 0 0 auto;
}


/* ===========================================================
   Meldo Confirm Modal
   =========================================================== */
.meldo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 22, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.meldo-modal-overlay.is-visible {
  opacity: 1;
}

.meldo-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px 32px 24px;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Akko', sans-serif;
}
.meldo-modal-overlay.is-visible .meldo-modal {
  transform: scale(1);
}

.meldo-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  background: #fff5f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meldo-modal-title {
  font-family: 'Akko', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #111416;
  margin: 0 0 6px;
}

.meldo-modal-msg {
  font-size: 13px;
  color: #6b6b6b;
  margin: 0 0 22px;
  line-height: 1.5;
}

.meldo-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.meldo-modal-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.meldo-modal-cancel {
  background: #f0f1f2;
  color: #111416;
}
.meldo-modal-cancel:hover {
  background: #e4e5e6;
}

.meldo-modal-confirm {
  background: #b80000;
  color: #fff;
}
.meldo-modal-confirm:hover {
  background: #9a0000;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(184, 0, 0, 0.3);
}

/* ===========================================================
   💧 Druck-Wasserzeichen
   =========================================================== */
.meldo-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  transform: rotate(-30deg);
  z-index: 9999;
}

@media print {
  .meldo-watermark {
    color: rgba(0, 0, 0, 0.15);
  }
}

/* ===========================================================
   🛡️ BuddyBoss & Theme Override Protection (v1.7.0)
   SVG-Icons sind immun gegen Font-Überschreibungen
   =========================================================== */

/* SVG-Icons in allen Button-Varianten */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn svg,
.meldo-pdf-wrapper .meldo-toolbar-group .meldo-btn svg,
div.meldo-pdf-wrapper .meldo-btn svg,
body .meldo-pdf-wrapper .meldo-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  fill: none !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Stelle sicher, dass :before und :after Pseudo-Elemente keine fremden Icons einfügen */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn::before,
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn::after {
  content: none !important;
}

/* Nur bei Tooltip-Hover den Content wiederherstellen */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn[title]:hover::after {
  content: attr(title) !important;
  font-family: 'Akko', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Verhindert, dass BuddyBoss Button-Styles die Sichtbarkeit beeinflussen */
.meldo-pdf-wrapper .meldo-btn,
.meldo-pdf-wrapper .meldo-btn:focus,
.meldo-pdf-wrapper .meldo-btn:active {
  color: var(--meldo-text) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Standard-Icons: dunkle Farbe */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn svg,
body .meldo-pdf-wrapper .meldo-btn svg {
  stroke: var(--meldo-text) !important;
}

/* ===========================================
   HOVER STATES - Weisse Icons auf türkis/rot
   =========================================== */

/* Normaler Button Hover - türkiser Hintergrund, weisses Icon */
html body .meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn:hover,
html body .meldo-pdf-wrapper .meldo-toolbar-group .meldo-btn:hover {
  background: var(--meldo-primary) !important;
  background-color: var(--meldo-primary) !important;
  border-color: var(--meldo-primary) !important;
  color: #fff !important;
}

html body .meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn:hover svg,
html body .meldo-pdf-wrapper .meldo-toolbar-group .meldo-btn:hover svg {
  stroke: #fff !important;
  color: #fff !important;
}

/* Aktive Buttons - grüner Hintergrund, weisses Icon */
html body .meldo-pdf-wrapper .meldo-btn.is-active,
html body .meldo-pdf-wrapper .meldo-btn.active {
  background: var(--meldo-secondary) !important;
  border-color: var(--meldo-secondary) !important;
  color: #fff !important;
}

html body .meldo-pdf-wrapper .meldo-btn.is-active svg,
html body .meldo-pdf-wrapper .meldo-btn.active svg {
  stroke: #fff !important;
}

/* Primary Button (Speichern) - türkiser Hintergrund, weisses Icon */
html body .meldo-pdf-wrapper .meldo-btn.is-primary {
  background: var(--meldo-primary) !important;
  border-color: var(--meldo-primary) !important;
  color: #fff !important;
}

html body .meldo-pdf-wrapper .meldo-btn.is-primary svg {
  stroke: #fff !important;
}

html body .meldo-pdf-wrapper .meldo-btn.is-primary:hover {
  background: #32666D !important;
  border-color: #32666D !important;
}

/* Danger Button (Löschen) - rotes Icon, bei Hover roter Hintergrund */
html body .meldo-pdf-wrapper .meldo-btn.is-danger {
  color: #b80000 !important;
}

html body .meldo-pdf-wrapper .meldo-btn.is-danger svg {
  stroke: #b80000 !important;
}

html body .meldo-pdf-wrapper .meldo-btn.is-danger:hover {
  background: #b80000 !important;
  background-color: #b80000 !important;
  border-color: #b80000 !important;
  color: #fff !important;
}

html body .meldo-pdf-wrapper .meldo-btn.is-danger:hover svg {
  stroke: #fff !important;
}

/* ===========================================================
   ⏳ Ladeanimation (v1.8.0)
   =========================================================== */

.meldo-loader.fade-out {
  opacity: 0 !important;
  pointer-events: none;
}

@keyframes meldo-spin {
  to { transform: rotate(360deg); }
}

/* ===========================================================
   ⛶ Vollbild-Modus
   =========================================================== */
.meldo-pdf-wrapper:fullscreen,
.meldo-pdf-wrapper:-webkit-full-screen {
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0;
  border: none;
}

.meldo-pdf-wrapper:fullscreen .meldo-pages,
.meldo-pdf-wrapper:-webkit-full-screen .meldo-pages {
  overflow: auto !important;
}

/* ===========================================================
   ♿ Accessibility & Fokus-Indikatoren (v1.8.0)
   =========================================================== */

/* Fokus-Ring für Tastaturnutzer */
.meldo-btn:focus-visible {
  outline: 2px solid var(--meldo-primary);
  outline-offset: 2px;
}

/* Skip-Link für Screen Reader */
.meldo-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Besserer Kontrast für aktive Buttons */
.meldo-btn.is-active:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px var(--meldo-secondary);
}


/* ============================================================
   🎵 v2.2.0 — Multi-Layer Support
   Read-only textboxes from foreign layers (e.g. teacher content
   on student view) get a subtle visual marker without breaking
   the established design.
   ============================================================ */
.meldo-textbox.meldo-readonly {
  cursor: default;
  user-select: text;
  /* slight outline only on hover, no permanent border to keep clean */
}
.meldo-textbox.meldo-readonly:hover {
  outline: 1px dashed rgba(61, 124, 133, 0.4);
  outline-offset: 2px;
}
.meldo-textbox.meldo-readonly[data-meldo-layer="teacher"]:hover::before {
  content: "Lehrer-Notiz";
  position: absolute;
  top: -22px;
  left: 0;
  font-size: 11px;
  font-family: "Akko", system-ui, sans-serif;
  font-weight: 600;
  background: #3D7C85;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

/* ===========================================================
   🟢 LÖSUNGS-LAYER v2.0  (v2.6.1)
   Alle Regeln wrapper-gescoped + !important → theme-sicher
   =========================================================== */

/* ---------- Layer auf der Seite ---------- */
.meldo-pdf-wrapper .meldo-solution-canvas {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  pointer-events: none !important;
  display: none;
  opacity: 0;
  transition: opacity .28s cubic-bezier(.4,0,.2,1);
}
.meldo-pdf-wrapper.meldo-sol-on .meldo-solution-canvas {
  display: block;
  opacity: var(--meldo-sol-alpha, .6);
}
.meldo-pdf-wrapper.meldo-sol-full .meldo-anno-canvas,
.meldo-pdf-wrapper.meldo-sol-full .meldo-textbox {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ---------- Leiste über der Toolbar ---------- */
.meldo-pdf-wrapper .meldo-solution-bar {
  position: relative !important;
  z-index: 70;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f7 100%) !important;
  border-bottom: 1px solid var(--meldo-border) !important;
  font-family: 'Akko', sans-serif !important;
}

/* ---------- Segment-Switch ---------- */
.meldo-pdf-wrapper .meldo-sol-switch {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 3px !important;
  background: #eef0f1 !important;
  border-radius: 999px !important;
  flex: 0 0 auto !important;
}
.meldo-pdf-wrapper .meldo-sol-thumb {
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  height: calc(100% - 6px) !important;
  width: 0;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #3D7C85 0%, #E8924F 100%) !important;
  box-shadow: 0 2px 8px rgba(61,124,133,.3) !important;
  transition: transform .34s cubic-bezier(.34,1.35,.5,1), width .34s cubic-bezier(.34,1.35,.5,1);
  pointer-events: none !important;
  z-index: 0 !important;
}

.meldo-pdf-wrapper .meldo-sol-btn {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 999px !important;
  padding: 7px 15px !important;
  min-height: 0 !important;
  height: auto !important;
  width: auto !important;
  cursor: pointer !important;
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #6b6b6b !important;
  white-space: nowrap !important;
  transition: color .22s ease !important;
  transform: none !important;
}
.meldo-pdf-wrapper .meldo-sol-btn svg {
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 auto !important;
  stroke: currentColor !important;
  fill: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
}
.meldo-pdf-wrapper .meldo-sol-btn:hover { color: #111416 !important; background: transparent !important; }
.meldo-pdf-wrapper .meldo-sol-btn.is-active,
.meldo-pdf-wrapper .meldo-sol-btn.is-active:hover { color: #ffffff !important; }
.meldo-pdf-wrapper .meldo-sol-btn::before,
.meldo-pdf-wrapper .meldo-sol-btn::after { content: none !important; }
.meldo-pdf-wrapper .meldo-sol-caret {
  width: 11px !important;
  height: 11px !important;
  margin-left: -1px !important;
  transition: transform .25s cubic-bezier(.34,1.35,.5,1) !important;
}
.meldo-pdf-wrapper .meldo-sol-trigger[aria-expanded="true"] .meldo-sol-caret { transform: rotate(180deg) !important; }

/* ---------- Dropdown ---------- */
.meldo-pdf-wrapper .meldo-sol-menu {
  position: absolute !important;
  top: calc(100% - 3px) !important;
  left: 10px !important;
  z-index: 90 !important;
  width: 268px !important;
  max-width: calc(100vw - 40px) !important;
  padding: 6px !important;
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.07) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 34px rgba(17,20,22,.16), 0 2px 6px rgba(17,20,22,.06) !important;
  transform-origin: top left;
  animation: meldo-sol-pop .22s cubic-bezier(.34,1.35,.5,1);
}
.meldo-pdf-wrapper .meldo-sol-menu[hidden] { display: none !important; }
@keyframes meldo-sol-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.meldo-pdf-wrapper .meldo-sol-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 9px 10px !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  text-align: left !important;
  text-transform: none !important;
  color: #111416 !important;
  transition: background .16s ease !important;
  transform: none !important;
  height: auto !important;
  min-height: 0 !important;
}
.meldo-pdf-wrapper .meldo-sol-item:hover { background: #f4f6f4 !important; }
.meldo-pdf-wrapper .meldo-sol-item::before,
.meldo-pdf-wrapper .meldo-sol-item::after { content: none !important; }

.meldo-pdf-wrapper .meldo-sol-item-ico {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 auto !important;
  border-radius: 9px !important;
  background: #eef0f1 !important;
  color: #6b6b6b !important;
  transition: background .16s ease, color .16s ease !important;
}
.meldo-pdf-wrapper .meldo-sol-item-ico svg { stroke: currentColor !important; }
.meldo-pdf-wrapper .meldo-sol-item.is-active .meldo-sol-item-ico {
  background: linear-gradient(135deg, #3D7C85, #E8924F) !important;
  color: #fff !important;
}

.meldo-pdf-wrapper .meldo-sol-item-txt {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.meldo-pdf-wrapper .meldo-sol-item-txt strong {
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  color: #111416 !important;
}
.meldo-pdf-wrapper .meldo-sol-item-txt em {
  font-family: 'Akko', sans-serif !important;
  font-style: normal !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
  color: #8a8a8a !important;
}
.meldo-pdf-wrapper .meldo-sol-item-check {
  flex: 0 0 auto !important;
  color: #3D7C85 !important;
  opacity: 0 !important;
  transform: scale(.6) !important;
  transition: opacity .18s ease, transform .18s cubic-bezier(.34,1.4,.5,1) !important;
}
.meldo-pdf-wrapper .meldo-sol-item.is-active .meldo-sol-item-check {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.meldo-pdf-wrapper .meldo-sol-sep {
  height: 1px !important;
  margin: 5px 8px !important;
  background: #edeeef !important;
}

/* ---------- Deckkraft-Regler ---------- */
.meldo-pdf-wrapper .meldo-sol-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 4px 12px 10px !important;
}
.meldo-pdf-wrapper .meldo-sol-row[hidden] { display: none !important; }
.meldo-pdf-wrapper .meldo-sol-row-label,
.meldo-pdf-wrapper .meldo-sol-val {
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  color: #8a8a8a !important;
  white-space: nowrap !important;
}
.meldo-pdf-wrapper .meldo-sol-val { min-width: 30px !important; text-align: right !important; }
.meldo-pdf-wrapper .meldo-sol-range {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex: 1 1 auto !important;
  min-width: 70px !important;
  height: 5px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #dfe1e2 0%, var(--meldo-sol-tint, #E8924F) 100%) !important;
  outline: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.meldo-pdf-wrapper .meldo-sol-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 2.5px solid #3D7C85;
  box-shadow: 0 1px 4px rgba(0,0,0,.22); cursor: pointer;
}
.meldo-pdf-wrapper .meldo-sol-range::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 2.5px solid #3D7C85;
  box-shadow: 0 1px 4px rgba(0,0,0,.22); cursor: pointer;
}
.meldo-pdf-wrapper .meldo-sol-right {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
  flex: 0 0 auto !important;
}

.meldo-pdf-wrapper .meldo-sol-peek,
.meldo-pdf-wrapper .meldo-sol-help {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 7px 13px !important;
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  border: 1px solid #e2e4e5 !important;
  outline: none !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  text-transform: none !important;
  color: #6b6b6b !important;
  white-space: nowrap !important;
  transform: none !important;
  transition: color .18s ease, border-color .18s ease, background .18s ease !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: none !important;
}
.meldo-pdf-wrapper .meldo-sol-peek::before,
.meldo-pdf-wrapper .meldo-sol-peek::after,
.meldo-pdf-wrapper .meldo-sol-help::before,
.meldo-pdf-wrapper .meldo-sol-help::after { content: none !important; }
.meldo-pdf-wrapper .meldo-sol-peek svg,
.meldo-pdf-wrapper .meldo-sol-help svg {
  width: 16px !important; height: 16px !important;
  flex: 0 0 auto !important; stroke: currentColor !important; fill: none !important;
}
.meldo-pdf-wrapper .meldo-sol-peek:hover,
.meldo-pdf-wrapper .meldo-sol-help:hover { color: #3D7C85 !important; border-color: #3D7C85 !important; }
.meldo-pdf-wrapper .meldo-sol-peek.is-peeking {
  background: linear-gradient(135deg, #3D7C85, #E8924F) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* ---------- Status-Chip ---------- */
.meldo-pdf-wrapper .meldo-sol-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 12px 5px 10px !important;
  border: 1px solid rgba(61,124,133,.22) !important;
  border-radius: 999px !important;
  background: rgba(61,124,133,.06) !important;
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  color: #111416 !important;
  animation: meldo-sol-in .28s cubic-bezier(.34,1.4,.5,1);
}
.meldo-pdf-wrapper .meldo-sol-status[hidden] { display: none !important; }
.meldo-pdf-wrapper .meldo-sol-status-dot {
  width: 8px !important; height: 8px !important;
  border-radius: 50% !important;
  background: var(--meldo-sol-tint, #E8924F) !important;
  animation: meldo-sol-pulse 2s ease-in-out infinite;
}
@keyframes meldo-sol-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.35); opacity: .5; }
}
@keyframes meldo-sol-in {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Mobile ---------- */
@media (max-width: 620px) {
  .meldo-pdf-wrapper .meldo-solution-bar { padding: 6px 8px !important; gap: 8px !important; }
  .meldo-pdf-wrapper .meldo-sol-btn { padding: 7px 12px !important; font-size: 12px !important; }
  .meldo-pdf-wrapper .meldo-sol-status-text { display: none !important; }
  .meldo-pdf-wrapper .meldo-sol-peek-label,
  .meldo-pdf-wrapper .meldo-sol-help-label { display: none !important; }
  .meldo-pdf-wrapper .meldo-sol-peek,
  .meldo-pdf-wrapper .meldo-sol-help { padding: 8px !important; }
  .meldo-pdf-wrapper .meldo-sol-status { padding: 6px !important; }
  .meldo-pdf-wrapper .meldo-sol-menu { left: 8px !important; width: calc(100% - 16px) !important; }
}

/* ---------- Dialog mit mehreren Optionen ---------- */
.meldo-modal.meldo-modal-stack { max-width: 380px; }
.meldo-modal-stack .meldo-modal-actions { flex-direction: column; gap: 8px; }
.meldo-modal-stack .meldo-modal-btn { width: 100%; }
.meldo-modal-btn.is-primary { background: #3D7C85; color: #fff; }
.meldo-modal-btn.is-primary:hover { background: #1F737A; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(61,124,133,.3); }
.meldo-modal-btn.is-ghost { background: transparent; color: #9a9a9a; font-weight: 500; }
.meldo-modal-btn.is-ghost:hover { background: #f5f6f7; color: #6b6b6b; }
.meldo-modal-icon.is-sol { background: rgba(232,146,79,.14); }

/* v2.14.0: Häkchen «Diese Frage nicht mehr anzeigen» */
.meldo-modal .meldo-modal-check {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin: -8px auto 18px !important;
  padding: 6px 12px 6px 8px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  user-select: none;
  font-family: 'Akko', sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  color: #5f6368 !important;
  text-transform: none !important;
  transition: background .15s ease !important;
}
.meldo-modal .meldo-modal-check:hover { background: #f4f6f4 !important; }
.meldo-modal .meldo-modal-check input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  pointer-events: none !important;
}
.meldo-modal .meldo-modal-check-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #c9cdd1 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: transparent !important;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .2s cubic-bezier(.34,1.4,.5,1) !important;
}
.meldo-modal .meldo-modal-check-box svg { transform: scale(.5); transition: transform .2s cubic-bezier(.34,1.4,.5,1); }
.meldo-modal .meldo-modal-check input:checked + .meldo-modal-check-box {
  background: #3D7C85 !important;
  border-color: #3D7C85 !important;
  color: #fff !important;
}
.meldo-modal .meldo-modal-check input:checked + .meldo-modal-check-box svg { transform: scale(1); }
.meldo-modal .meldo-modal-check input:focus-visible + .meldo-modal-check-box {
  box-shadow: 0 0 0 3px rgba(61,124,133,.25) !important;
}
.meldo-pdf-wrapper .meldo-sol-gate-reset-wrap[hidden] { display: none !important; }

/* ---------- Peek: Lade- und Halte-Zustand ---------- */
.meldo-pdf-wrapper .meldo-sol-peek.is-loading {
  color: #3D7C85 !important;
  border-color: #3D7C85 !important;
  background: #fff !important;
  cursor: progress !important;
}
.meldo-pdf-wrapper .meldo-sol-peek.is-loading svg {
  animation: meldo-sol-blink 1s ease-in-out infinite;
}
.meldo-pdf-wrapper .meldo-sol-peek.is-loading .meldo-sol-peek-label::after {
  content: ' …';
}
@keyframes meldo-sol-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* ===========================================================
   ❓ Geführte Tour (v2.6.9)
   =========================================================== */
.meldo-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 999997;
  opacity: 0;
  transition: opacity .22s ease;
  font-family: 'Akko', sans-serif;
}
.meldo-tour-overlay.is-visible { opacity: 1; }

.meldo-tour-spot {
  position: absolute;
  left: 0; top: 0; width: 0; height: 0;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(17, 20, 22, .58);
  outline: 2px solid rgba(232, 146, 79, .85);
  outline-offset: 0;
  transition: left .3s cubic-bezier(.4,0,.2,1), top .3s cubic-bezier(.4,0,.2,1),
              width .3s cubic-bezier(.4,0,.2,1), height .3s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  pointer-events: none;
}

.meldo-tour-card {
  position: absolute;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 18px 20px 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(17,20,22,.28), 0 2px 6px rgba(17,20,22,.1);
  transition: left .3s cubic-bezier(.4,0,.2,1), top .3s cubic-bezier(.4,0,.2,1);
}
.meldo-tour-close {
  position: absolute !important;
  top: 10px !important; right: 10px !important;
  width: 26px !important; height: 26px !important;
  padding: 0 !important; margin: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border: none !important; background: transparent !important; box-shadow: none !important;
  border-radius: 50% !important; cursor: pointer !important;
  color: #b6b8b9 !important; transform: none !important;
}
.meldo-tour-close:hover { background: #f2f3f4 !important; color: #111416 !important; }
.meldo-tour-close::before, .meldo-tour-close::after { content: none !important; }

.meldo-tour-title {
  margin: 0 26px 6px 0 !important;
  font-family: 'Akko', sans-serif !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  color: #111416 !important;
}
.meldo-tour-text {
  margin: 0 0 16px !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: #6b6b6b !important;
}

.meldo-tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.meldo-tour-dots { display: flex; gap: 5px; }
.meldo-tour-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #dfe1e2;
  transition: background .2s ease, width .2s ease;
}
.meldo-tour-dot.is-active {
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3D7C85, #E8924F);
}
.meldo-tour-actions { display: flex; gap: 6px; }

.meldo-tour-btn {
  border: none !important;
  outline: none !important;
  border-radius: 10px !important;
  padding: 9px 16px !important;
  margin: 0 !important;
  height: auto !important; min-height: 0 !important; width: auto !important;
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  text-transform: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background .16s ease, color .16s ease !important;
}
.meldo-tour-btn::before, .meldo-tour-btn::after { content: none !important; }
.meldo-tour-btn.is-primary { background: #3D7C85 !important; color: #fff !important; }
.meldo-tour-btn.is-primary:hover { background: #1F737A !important; }
.meldo-tour-btn.is-ghost { background: transparent !important; color: #8a8a8a !important; }
.meldo-tour-btn.is-ghost:hover { background: #f2f3f4 !important; color: #111416 !important; }

@media (max-width: 620px) {
  .meldo-tour-card { width: calc(100vw - 24px); padding: 16px 16px 12px; }
  .meldo-tour-title { font-size: 15px !important; }
  .meldo-tour-text { font-size: 13px !important; }
}

/* Hilfe-Button: dezenter als Peek, Label erst ab mittlerer Breite */
.meldo-pdf-wrapper .meldo-sol-help { color: #8a8a8a !important; }
@media (max-width: 900px) {
  .meldo-pdf-wrapper .meldo-sol-help-label { display: none !important; }
  .meldo-pdf-wrapper .meldo-sol-help { padding: 8px !important; }
}

/* ===========================================================
   🎬 VIDEO-DOCK v1.0 (v2.8.0)
   Zustände nur per Klasse – der Player wird nie umgehängt.
   =========================================================== */

/* ---------- Auslöser in der Leiste ---------- */
.meldo-pdf-wrapper .meldo-video-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  flex: 0 0 auto !important;
  margin: 0 0 0 4px !important;
  padding: 7px 14px !important;
  height: auto !important; min-height: 0 !important; width: auto !important;
  border: none !important;
  outline: none !important;
  background: linear-gradient(135deg, #3D7C85 0%, #E8924F 100%) !important;
  box-shadow: 0 2px 8px rgba(61,124,133,.28) !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  font-family: 'Akko', sans-serif !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  text-transform: none !important;
  color: #fff !important;
  white-space: nowrap !important;
  transform: none !important;
  transition: filter .18s ease !important;
}
.meldo-pdf-wrapper .meldo-video-toggle::before,
.meldo-pdf-wrapper .meldo-video-toggle::after { content: none !important; }
.meldo-pdf-wrapper .meldo-video-toggle:hover { filter: brightness(1.06) !important; }
.meldo-pdf-wrapper .meldo-video-toggle.is-open {
  background: #eef0f1 !important;
  color: #6b6b6b !important;
  box-shadow: none !important;
}
.meldo-pdf-wrapper .meldo-video-toggle svg { width: 14px !important; height: 14px !important; flex: 0 0 auto !important; }

/* ---------- Dock-Grundgerüst ---------- */
.meldo-video-dock {
  position: absolute;
  z-index: 75;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1d1f21;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(17,20,22,.32), 0 2px 6px rgba(17,20,22,.14);
  font-family: 'Akko', sans-serif;
  animation: meldo-video-in .24s cubic-bezier(.34,1.3,.5,1);
}
.meldo-video-dock[hidden] { display: none !important; }
@keyframes meldo-video-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; }
}
.meldo-video-dock.is-floating,
.meldo-video-dock.is-min { transition: transform .3s cubic-bezier(.34,1.25,.5,1), width .2s ease; }
.meldo-video-dock.is-dragging { transition: none !important; }
.meldo-video-dock.is-dragging .meldo-video-stage { pointer-events: none; }

.meldo-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 6px 0 10px;
  background: #26292b;
  color: #e8eaea;
  user-select: none;
  -webkit-user-select: none;
}
.meldo-video-grab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  cursor: grab;
  color: #8b9092;
  touch-action: none;
}
.meldo-video-dock.is-dragging .meldo-video-grab { cursor: grabbing; }
.meldo-video-title {
  font-family: 'Akko', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  color: #e8eaea;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meldo-video-tools { display: inline-flex; align-items: center; gap: 1px; flex: 0 0 auto; }

.meldo-video-dock .meldo-video-ico {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important; height: 28px !important;
  padding: 0 !important; margin: 0 !important;
  min-height: 0 !important;
  border: none !important; outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  color: #8b9092 !important;
  transform: none !important;
  transition: background .15s ease, color .15s ease !important;
}
.meldo-video-dock .meldo-video-ico::before,
.meldo-video-dock .meldo-video-ico::after { content: none !important; }
.meldo-video-dock .meldo-video-ico:hover { background: rgba(255,255,255,.09) !important; color: #fff !important; }
.meldo-video-dock .meldo-video-ico.is-active { background: rgba(232,146,79,.22) !important; color: #E8B085 !important; }
.meldo-video-dock .meldo-video-ico.is-close:hover { background: rgba(233,79,55,.25) !important; color: #ff9c8a !important; }

.meldo-video-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
}
.meldo-video-stage iframe,
.meldo-video-stage video,
.meldo-video-stage .presto-player,
.meldo-video-stage .plyr {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}
.meldo-video-missing {
  margin: 0; padding: 24px 16px;
  text-align: center; color: #8b9092; font-size: 13px;
}

.meldo-video-resize {
  position: absolute;
  display: none;
  z-index: 2;
  touch-action: none;
}
.meldo-video-resize::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 999px;
  background: rgba(255,255,255,.32);
}

/* ---------- Zustand: schwebend (viewport-fixiert wie ein Mini-Player) ---------- */
.meldo-video-dock.is-floating {
  position: fixed;
  left: 0; top: 0;
  z-index: 999990;
  width: var(--meldo-video-w, 380px);
}
/* Höhe frei ziehbar: solange --meldo-video-fh auf auto steht, gilt 16:9 */
.meldo-video-dock.is-floating .meldo-video-stage {
  height: var(--meldo-video-fh, auto);
  aspect-ratio: var(--meldo-video-ar, 16 / 9);
}
.meldo-video-dock.is-floating .meldo-video-stage[style],
.meldo-video-dock.is-floating .meldo-video-stage { min-height: 0; }
.meldo-video-dock.is-floating .meldo-video-resize,
.meldo-video-dock.is-sheet .meldo-video-resize {
  display: block;
  right: 0; bottom: 0;
  width: 18px; height: 18px;
  cursor: nwse-resize;
}
.meldo-video-dock.is-floating .meldo-video-resize.is-left,
.meldo-video-dock.is-sheet .meldo-video-resize.is-left {
  right: auto; left: 0; bottom: 0;
  cursor: nesw-resize;
}
.meldo-video-dock .meldo-video-resize::after { width: 8px; height: 8px; }
.meldo-video-dock.is-column .meldo-video-resize.is-left,
.meldo-video-dock.is-min .meldo-video-resize.is-left { display: none; }

/* ---------- Zustand: minimiert (Pille, Player bleibt geladen) ---------- */
.meldo-video-dock.is-min {
  position: fixed;
  left: 0; top: 0;
  z-index: 999990;
  width: 240px;
  height: 40px;
}
.meldo-video-dock.is-min .meldo-video-stage { aspect-ratio: 16 / 9; }
.meldo-video-dock.is-min .meldo-video-resize { display: none; }

/* ---------- Zustand: rechte Spalte ---------- */
.meldo-video-dock.is-column {
  top: var(--meldo-chrome-h, 90px);
  right: 0; bottom: 0;
  left: auto;
  width: var(--meldo-video-w, 360px);
  border-radius: 0;
  box-shadow: -6px 0 20px rgba(17,20,22,.14);
}
.meldo-video-dock.is-column .meldo-video-stage { flex: 0 0 auto; aspect-ratio: 16 / 9; }
.meldo-video-dock.is-column .meldo-video-resize {
  display: block;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  cursor: ew-resize;
}
.meldo-video-dock.is-column .meldo-video-resize::after { width: 3px; height: 40px; }
.meldo-pdf-wrapper.meldo-video-column .meldo-pdf-body { margin-right: var(--meldo-video-w, 360px); }

/* ---------- Zustand: unten angedockt ---------- */
/* v2.9.8: unten mittig am Fensterrand statt über die volle Breite –
   so wird das Bild nicht mehr beschnitten */
.meldo-video-dock.is-sheet {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 999990;
  width: var(--meldo-video-w, 380px);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 -8px 26px rgba(17,20,22,.24);
}
.meldo-video-dock.is-sheet .meldo-video-stage {
  height: var(--meldo-video-fh, auto);
  aspect-ratio: var(--meldo-video-ar, 16 / 9);
  min-height: 0;
}

/* Automatisch abgelöster Mini-Player (Block ausserhalb des Blickfelds) */
.meldo-video-dock.is-detached { box-shadow: 0 16px 44px rgba(17,20,22,.4), 0 0 0 2px rgba(232,146,79,.5); }

/* ---------- Mobile: nur Sheet und minimiert ---------- */
@media (max-width: 780px) {
  /* v2.9.13: Beschriftung bleibt auch mobil sichtbar – ein reines
     Play-Symbol ist nicht eindeutig genug */
  .meldo-pdf-wrapper .meldo-video-toggle-label {
    display: inline !important;
    max-width: 12ch !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .meldo-pdf-wrapper .meldo-video-toggle {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  .meldo-video-dock .meldo-video-ico[data-video="column"] { display: none !important; }
  .meldo-video-dock.is-min { width: 200px; }
  /* Auf schmalen Geräten mehr Platz für die Player-Bedienung */
  .meldo-video-dock.is-floating .meldo-video-head { padding: 4px 6px; }
  .meldo-video-dock.is-floating .meldo-video-ico { width: 30px; height: 30px; }
  .meldo-video-dock.is-floating .meldo-video-title { font-size: 12px; }
}
.meldo-pdf-body { transition: grid-template-columns .25s ease, margin-right .25s ease, margin-bottom .25s ease; }

/* ============================================================
   Ladefehler – erklärende Fläche statt endlosem Weiss (v2.9.0)
   ============================================================ */
.meldo-pdf-wrapper .meldo-load-error {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 240px !important;
  padding: 32px 24px !important;
  text-align: center !important;
  color: #111416 !important;
}
.meldo-pdf-wrapper .meldo-load-error-title {
  margin: 0 !important;
  font-family: 'Akko', system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 16px !important;
}
.meldo-pdf-wrapper .meldo-load-error-hint {
  margin: 0 !important;
  font-size: 13px !important;
  opacity: .7 !important;
  max-width: 34ch !important;
}
.meldo-pdf-wrapper .meldo-load-error-btn {
  margin-top: 6px !important;
  padding: 9px 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #3D7C85 !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(61,124,133,.28) !important;
  transition: transform .18s ease, box-shadow .18s ease !important;
}
.meldo-pdf-wrapper .meldo-load-error-btn:hover { transform: translateY(-1px) !important; }

/* ============================================================
   Meldo Video (Note Writer) im Dock – v2.9.9
   Der Player bringt eine eigene Steuerleiste unter dem 16:9-Viewport
   mit. Ein festes Seitenverhältnis auf der Bühne würde sie abschneiden.
   ============================================================ */
.meldo-video-dock.is-native .meldo-video-stage {
  height: auto !important;
  aspect-ratio: auto !important;
  flex: 0 0 auto !important;
  background: #1a1a1a !important;
  overflow: visible !important;
}
.meldo-video-dock.is-native .mnw-pp {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.meldo-video-dock.is-native.is-sheet,
.meldo-video-dock.is-native.is-floating { height: auto !important; }
.meldo-video-dock.is-native.is-column .meldo-video-stage { flex: 0 0 auto !important; }

/* Während einer Zwischenaufgabe tritt das Dock zurück */
.meldo-video-dock.is-task-open {
  opacity: .18 !important;
  pointer-events: none !important;
  transition: opacity .2s ease !important;
}

/* v2.9.11: Steuerleiste des Meldo-Players darf nicht wegfallen */
.meldo-video-dock.is-native .mnw-pp-controls {
  display: block !important;
  flex: 0 0 auto !important;
}
.meldo-video-dock.is-native .mnw-pp {
  display: flex !important;
  flex-direction: column !important;
}

/* ============================================================
   v2.9.15: Doppelte Symbole unterbinden
   Das Theme setzt Icon-Fonts über ::before auf Beschriftungs-Elemente
   innerhalb von Schaltflächen. Die bisherigen Resets galten nur für
   die Schaltfläche selbst, nicht für ihre Kinder – dadurch erschien
   neben unserem SVG ein zweites Symbol.
   ============================================================ */
.meldo-pdf-wrapper .meldo-sol-bar button *::before,
.meldo-pdf-wrapper .meldo-sol-bar button *::after,
.meldo-pdf-wrapper .meldo-sol-bar a *::before,
.meldo-pdf-wrapper .meldo-sol-bar a *::after,
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn *::before,
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn *::after,
.meldo-pdf-wrapper .meldo-video-dock button *::before,
.meldo-pdf-wrapper .meldo-video-dock button *::after,
.meldo-pdf-wrapper .meldo-sol-menu button *::before,
.meldo-pdf-wrapper .meldo-sol-menu button *::after {
  content: none !important;
  display: none !important;
}

/* Beschriftungen selbst bleiben unangetastet.
   Die Hilfe-Beschriftung wird auf schmalen Geräten bewusst
   ausgeblendet und darf hier nicht zurückgeholt werden. */
.meldo-pdf-wrapper .meldo-sol-btn-label,
.meldo-pdf-wrapper .meldo-video-toggle-label {
  display: inline !important;
}

/* ============================================================
   v2.9.16: Fremd-Symbole aus den Beschriftungen entfernen
   Ein anderes Meldo-Plugin durchsucht Schaltflächen nach Texten wie
   „Arbeitsblatt" oder „Video" und schiebt ein eigenes SVG in ein
   <span class="mwl-panel-ikon"> davor. Das ist ein echtes Element,
   kein ::before – die Resets aus 2.9.15 konnten es nicht treffen.
   Das inline gesetzte display wird durch !important überstimmt.
   ============================================================ */
.meldo-pdf-wrapper .mwl-panel-ikon,
.meldo-pdf-wrapper [data-mwl-ikon] > .mwl-panel-ikon,
.meldo-pdf-wrapper .meldo-sol-btn-label > *,
.meldo-pdf-wrapper .meldo-video-toggle-label > *,
.meldo-pdf-wrapper .meldo-sol-help-label > *,
.meldo-pdf-wrapper .meldo-sol-item-label > * {
  display: none !important;
}


/* ===========================================================
   Lizenzbalken (Modus mark="bar", z. B. Zusatzmaterialien)
   Sitzt unter der Seite statt darüber – verdeckt keine Noten.
   =========================================================== */
.meldo-licensebar {
  display: none;
}
@media print {
  .meldo-licensebar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 10px;
    margin-top: 4px;
    background: #FAF8F3;
    border-top: 1px solid #3D7C85;
    font-family: Akko, "Trebuchet MS", sans-serif;
    font-size: 7pt;
    line-height: 1.3;
    color: #111416;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .meldo-lb-logo { width: 14px; height: 14px; flex: 0 0 auto; }
  .meldo-lb-text { font-weight: 600; }
  .meldo-lb-meta { margin-left: auto; color: #8a8f94; }
}

/* ===========================================================
   ✍️ Schreibfelder über Lücken (v2.15.0)
   Schrift fix 16 px, Grösse über transform (iOS zoomt sonst beim Antippen)
   =========================================================== */
.meldo-pdf-wrapper .meldo-field-layer {
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  pointer-events: none !important;
}
.meldo-pdf-wrapper .meldo-field {
  position: absolute !important;
  display: block !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 5px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  transform-origin: 0 0 !important;
  border: none !important;
  border-radius: 7px !important;
  outline: none !important;
  background: rgba(61, 124, 133, .075) !important;
  box-shadow: inset 0 -2px 0 rgba(61, 124, 133, .35) !important;
  color: #3D7C85 !important;
  -webkit-text-fill-color: #3D7C85 !important;
  caret-color: #3D7C85 !important;
  font-family: 'Akko', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: normal !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  pointer-events: auto !important;
  cursor: text !important;
  transition: background .18s ease, box-shadow .18s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.meldo-pdf-wrapper .meldo-field.is-left { text-align: left !important; }
.meldo-pdf-wrapper .meldo-field:hover { background: rgba(61, 124, 133, .13) !important; }
.meldo-pdf-wrapper .meldo-field.has-value {
  background: rgba(255, 255, 255, .55) !important;
  box-shadow: none !important;
}
.meldo-pdf-wrapper .meldo-field:focus {
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 0 0 2px #3D7C85, 0 4px 14px rgba(61, 124, 133, .22) !important;
}
.meldo-pdf-wrapper .meldo-page-wrap.meldo-pen-on .meldo-field { pointer-events: none !important; }
.meldo-pdf-wrapper.meldo-sol-full .meldo-field-layer { visibility: hidden !important; }
/* Vergleichen: eigene Antwort unter die Linie, Lösung bleibt in der Lücke sichtbar */
.meldo-pdf-wrapper.meldo-sol-on .meldo-field {
  --meldo-fdy: 80%;
  background: transparent !important;
  box-shadow: none !important;
}

/* v2.15.2: Das Theme (BuddyBoss, FitVids) packt den Vimeo-Rahmen des Meldo-Players nachträglich in
   .fluid-width-video-wrapper ohne Höhe → schwarzes Bild, nur Ton. Hülle und Rahmen füllen die Bühne. */
.meldo-pdf-wrapper .mnw-vp-buehne > .fluid-width-video-wrapper {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.meldo-pdf-wrapper .mnw-vp-buehne > .fluid-width-video-wrapper > iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* v2.15.3: Tooltips der Werkzeugleiste wurden vom Seitenbereich verdeckt. Der Knopf hebt sich beim Hover
   per transform an und bildet damit eine eigene Ebene – der Tooltip (z-index 99999) wirkt nur darin.
   Den gehoverten Knopf selbst über den Seitenbereich legen. */
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn[title]:hover,
.meldo-pdf-wrapper .meldo-pdf-toolbar .meldo-btn[title]:focus-visible {
  z-index: 60 !important;
}

/* =====================================================================
   v2.16.0 — Rahmen C / Meldo-Designsystem (Wunsch Manuel 5.11.)
   Wie Songs, Werkstatt und Audiotools: keine Verläufe, Leisten flach,
   Umschalter als Kapsel (Schiene getönt, aktiv weiss gehoben, Schrift in
   Tinte, Symbol türkis), Werkzeugknöpfe als getönte Kapseln ohne Rand,
   gewähltes Werkzeug hell türkis mit Ring, Speichern bleibt türkis.
   :not(#m-x) hebt über die älteren ID-Regeln oben.
   ===================================================================== */
html body .meldo-pdf-wrapper:not(#m-x) .meldo-solution-bar,
html body .meldo-pdf-wrapper:not(#m-x) .meldo-pdf-toolbar {
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  border-bottom: 1px solid #EEF2F2 !important;
}

/* Arbeitsblatt · Lösung */
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-switch {
  background: rgba(26,52,56,.07) !important;
  box-shadow: none !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-thumb {
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 10px rgba(26,52,56,.12) !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-btn { color: #4A5658 !important; }
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-btn:hover { color: #111416 !important; }
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-btn.is-active { color: #111416 !important; }
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-btn.is-active svg { color: #3D7C85 !important; stroke: #3D7C85 !important; }

/* Kurz zeigen · Hilfe: ruhige Kapseln */
html body .meldo-pdf-wrapper:not(#m-x) :is(.meldo-sol-peek, .meldo-sol-help) {
  background: rgba(26,52,56,.06) !important;
  border-color: transparent !important;
  color: #4A5658 !important;
  box-shadow: none !important;
}
html body .meldo-pdf-wrapper:not(#m-x) :is(.meldo-sol-peek, .meldo-sol-help):hover {
  background: rgba(26,52,56,.10) !important;
  color: #111416 !important;
  border-color: transparent !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-peek.is-peeking {
  background: #3D7C85 !important;
  background-image: none !important;
  color: #fff !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-sol-item.is-active .meldo-sol-item-ico,
html body .meldo-pdf-wrapper:not(#m-x) .meldo-video-toggle {
  background: #3D7C85 !important;
  background-image: none !important;
}

/* Ansicht · Zeichnen · Aktionen */
html body .meldo-pdf-wrapper:not(#m-x) .meldo-mode-pills {
  background: rgba(26,52,56,.07) !important;
  border-radius: 999px !important;
  padding: 3px !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-pill {
  border-radius: 999px !important;
  color: #4A5658 !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-pill:hover { color: #111416 !important; background: transparent !important; }
html body .meldo-pdf-wrapper:not(#m-x) .meldo-pill.is-active {
  background: #fff !important;
  background-image: none !important;
  color: #111416 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 10px rgba(26,52,56,.12) !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-pill.is-active svg { color: #3D7C85 !important; stroke: #3D7C85 !important; }

/* Symbolknöpfe in den Leisten (Seitenleiste, Blättern, Vollbild, Werkzeuge) */
html body .meldo-pdf-wrapper:not(#m-x) .meldo-btn.meldo-btn-sm:not(.is-primary) {
  background: rgba(26,52,56,.06) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #111416 !important;
  box-shadow: none !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-btn.meldo-btn-sm:not(.is-primary) svg { stroke: currentColor !important; color: currentColor !important; }
html body .meldo-pdf-wrapper:not(#m-x) .meldo-btn.meldo-btn-sm:not(.is-primary):hover {
  background: rgba(26,52,56,.11) !important;
  color: #111416 !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-btn.meldo-btn-sm:not(.is-primary):is(.is-active, .active) {
  background: #EEF3F4 !important;
  color: #1F737A !important;
  box-shadow: inset 0 0 0 1.5px #3D7C85 !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-btn.is-primary {
  background: #3D7C85 !important;
  background-image: none !important;
  border-color: #3D7C85 !important;
  box-shadow: none !important;
}
html body .meldo-pdf-wrapper:not(#m-x) .meldo-btn.is-primary:hover { background: #1F737A !important; border-color: #1F737A !important; }
html body .meldo-pdf-wrapper:not(#m-x) .meldo-mode-expand { border-color: #EEF2F2 !important; }

.meldo-tour-dot.is-active { background: #3D7C85 !important; }
