/* Popup-Fenster der Themewerk Verwaltung. Farben, Rundung und Breite kommen als CSS-Variablen aus der Vorlage. */
.twf-popup {
  box-sizing: border-box;
  width: min(var(--twf-popup-width, 620px), calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--twf-popup-radius, 0);
  background: var(--twf-popup-bg, #fff);
  color: var(--twf-popup-color, #2b2320);
}
.twf-popup::backdrop { background: var(--twf-popup-overlay, rgba(0, 0, 0, .6)); }
.twf-popup[open] { animation: twf-popup-in .35s ease both; }
.twf-popup[open]::backdrop { animation: twf-popup-fade .35s ease both; }
@keyframes twf-popup-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes twf-popup-fade { from { opacity: 0; } }
html.twf-popup-open { overflow: hidden; }

.twf-popup__box { position: relative; padding: clamp(24px, 4vw, 40px); padding-right: clamp(48px, 7vw, 76px); outline: none; }
.twf-popup__title { margin: 0 0 .4em; color: inherit; font-size: clamp(26px, 4vw, 40px); line-height: 1.15; }
.twf-popup__text { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; }
.twf-popup__text > :first-child { margin-top: 0; }
.twf-popup__text > :last-child { margin-bottom: 0; }
.twf-popup__text a { color: inherit; }
.twf-popup__actions { margin: 1.5em 0 0; }
.twf-popup__close {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; transition: transform .3s ease, opacity .3s ease;
}
.twf-popup__close svg { width: 30px; height: 30px; }
.twf-popup__close:hover { transform: rotate(90deg); opacity: .65; }
.twf-popup__close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) {
  .twf-popup[open], .twf-popup[open]::backdrop { animation: none; }
  .twf-popup__close { transition: none; }
}

/* Nur in der Verwaltung */
.twf-popup-list tr.is-active td { background: #edf7ee; }
.twf-popup-new { margin-top: 12px; }
.twf-popup-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 480px); gap: 32px; align-items: start; }
.twf-popup-edit__preview { position: sticky; top: 48px; }
.twf-popup-stage { display: grid; place-items: center; min-height: 360px; padding: 24px; background: linear-gradient(var(--twf-popup-overlay, rgba(0, 0, 0, .6)), var(--twf-popup-overlay, rgba(0, 0, 0, .6))), repeating-linear-gradient(45deg, #ddd 0 14px, #eee 14px 28px); }
.twf-popup--preview { display: block; position: static; width: 100%; max-width: var(--twf-popup-width, 620px); max-height: none; }
.twf-popup--preview .twf-popup__close { pointer-events: none; }
@media (max-width: 1100px) { .twf-popup-edit { grid-template-columns: 1fr; } .twf-popup-edit__preview { position: static; } }
