/* Rich-Text-Editor und Medienauswahl der öffentlichen WT-Seite.
   Wird nur von den beiden Seiten geladen, die sie brauchen (Pflegemaske und
   die öffentliche Seite selbst), nicht global. Werte und Abstände sind
   bewusst dieselben wie im Mail-Editor, damit sich beide gleich anfühlen. */

/* ---- Werkzeugleiste + Schreibfläche ---- */
.rt-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  padding: .4rem .6rem; background: #f4f6f8; border: 1px solid #e2e6ea;
  border-radius: 5px 5px 0 0; border-bottom: 0;
}
.rt-toolbar .form-control { display: inline-block; width: auto; height: calc(1.5em + .5rem + 2px); padding: .15rem .4rem; }
.rt-toolbar input[type=color] { width: 34px; padding: 1px; }

.rt-body {
  min-height: 220px; max-height: 60vh; overflow-y: auto; padding: 14px 16px;
  border: 1px solid #e2e6ea; border-radius: 0 0 5px 5px; background: #fff;
  font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.55; color: #3E484E;
}
.rt-body:focus { outline: none; box-shadow: inset 0 0 0 2px #6ea8fe; }
.rt-body p { margin: 0 0 .8em; }
.rt-body p:last-child { margin-bottom: 0; }
.rt-body img { max-width: 100%; height: auto; }

/* ---- Ausgewählte Medien in der Pflegemaske ---- */
.pp-media-item, .pp-lib-item {
  border: 1px solid #e2e6ea; border-radius: 5px; padding: .4rem; background: #fff; height: 100%;
}
.pp-media-item img, .pp-lib-item img {
  width: 100%; height: 110px; object-fit: contain; background: #f4f6f8; border-radius: 3px;
}
.pp-media-doc {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; height: 110px; background: #f4f6f8; border-radius: 3px; padding: .25rem;
  font-size: .75rem; text-align: center; overflow: hidden;
}
.pp-media-doc i { font-size: 1.6rem; }
.pp-media-doc span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Öffentliche Seite ---- */
.wt-public-text img { max-width: 100%; height: auto; }
.wt-gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: 5px; }
/* Höhe setzt die Seite als Variable (1.52): der Verein stellt sie mandantenweit
   ein, ein Anlass darf sie überschreiben. Die 90px hier sind nur die
   Rückfallebene, falls die Variable einmal fehlt — der Stand vor 1.52. */
.wt-sponsors img { max-height: var(--wt-sponsor-h, 90px); max-width: 100%; object-fit: contain; }

/* Der Fliesstext der öffentlichen Seite darf nie seitwärts schieben — was
   nicht passt (eine breite Tabelle aus einem Einfügen, ein sehr langer Link),
   rollt in seinem eigenen Kasten. */
.wt-public-text { overflow-x: auto; }
.wt-public-text a { word-break: break-word; }

@media (max-width: 575.98px) {
  .rt-toolbar { gap: .25rem; padding: .35rem .4rem; }
  .rt-toolbar .form-control { max-width: 110px; }
  .rt-body { min-height: 180px; padding: 10px 12px; }
  .wt-gallery img { height: 140px; }
}
