/* Widget „DECO HOME Abo + Prämie“ (Seitenleiste). Lato und Abril Fatface lädt die Website selbst. Maße der Bühne in cqw, damit das
   Motiv auch in der mobilen, breiteren Seitenleiste gleich aussieht. Die Einblendung läuft als CSS-Animation auch ohne Skript;
   das Skript hält sie nur an (is-wait), solange das Widget außerhalb des Sichtbereichs liegt. */

.dh-sw {
  --dh-sw-accent: #870054;
  --dh-sw-accent-hover: #6b0043;
  --dh-sw-stage: #eee7f4;
  --dh-sw-ink: #171717;
  --dh-sw-muted: #46423c;
  --dh-sw-ease: cubic-bezier(.2, .7, .2, 1);
  --dh-sw-pop: cubic-bezier(.34, 1.56, .64, 1);
  container-type: inline-size;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  color: var(--dh-sw-ink);
  font: 400 16px/1.45 Lato, sans-serif;
  text-align: left;
}

/* Bühne */
.dh-sw-stage {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--dh-sw-stage);
}

.dh-sw .dh-sw-cover {
  position: absolute;
  top: 10%;
  left: 7%;
  width: 31%;
  height: auto;
  max-width: none;
  rotate: -4deg;
  box-shadow: 0 6px 14px rgba(23, 23, 23, .28);
  animation: dh-sw-cover .8s var(--dh-sw-ease) both;
}

.dh-sw-circle {
  position: absolute;
  top: 15%;
  left: 49%;
  width: 37%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1.4cqw solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 14px rgba(23, 23, 23, .18);
  animation: dh-sw-pop .7s .15s var(--dh-sw-pop) both;
}

.dh-sw .dh-sw-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  scale: 1.12;
  transition: opacity .6s ease, scale 1.1s var(--dh-sw-ease);
}

.dh-sw .dh-sw-shot.is-active {
  opacity: 1;
  scale: 1;
}

.dh-sw-plus {
  position: absolute;
  top: calc(50% - 4cqw);
  left: calc(43.5% - 4cqw);
  display: grid;
  place-items: center;
  width: 8cqw;
  height: 8cqw;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 23, 23, .2);
  color: var(--dh-sw-accent);
  font-size: 5.6cqw;
  font-weight: 700;
  line-height: 1;
  animation: dh-sw-pop .55s .4s var(--dh-sw-pop) both;
}

.dh-sw-badge {
  position: absolute;
  top: 3%;
  right: 2.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 21cqw;
  height: 21cqw;
  border-radius: 50%;
  background: var(--dh-sw-accent);
  box-shadow: 0 4px 10px rgba(23, 23, 23, .2);
  color: #fff;
  text-align: center;
  rotate: 8deg;
  animation: dh-sw-pop .6s .5s var(--dh-sw-pop) both;
}

.dh-sw-badge-price {
  font: 400 6.6cqw/1 'Abril Fatface', Georgia, serif;
  white-space: nowrap;
}

.dh-sw-badge-sub {
  margin-top: .4cqw;
  font-size: 2.9cqw;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Sanftes Schweben, solange die Prämien automatisch wechseln (endet mit der ersten eigenen Wahl). */
.dh-sw.is-running .dh-sw-cover {
  animation: dh-sw-cover .8s var(--dh-sw-ease) both, dh-sw-float 7s 1s ease-in-out infinite;
}

.dh-sw.is-running .dh-sw-badge {
  animation: dh-sw-pop .6s .5s var(--dh-sw-pop) both, dh-sw-float 5s 1.2s ease-in-out infinite;
}

.dh-sw.is-wait .dh-sw-cover,
.dh-sw.is-wait .dh-sw-circle,
.dh-sw.is-wait .dh-sw-plus,
.dh-sw.is-wait .dh-sw-badge {
  animation: none;
  opacity: 0;
}

/* Inhalt */
.dh-sw-body {
  padding: 12px 12px 12px;
  text-align: center;
}

.dh-sw-headline {
  margin-bottom: 4px;
  color: var(--dh-sw-ink);
  font: 400 24px/1.1 'Abril Fatface', Georgia, serif;
}

.dh-sw-text {
  margin-bottom: 8px;
  color: var(--dh-sw-ink);
  font-size: 14px;
  line-height: 1.3;
}

/* Alle Prämien liegen übereinander, beim Wechsel springt nichts. Der Name bleibt einzeilig (das Skript verkleinert lange Namen, ohne Skript endet er mit …). */
.dh-sw-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.dh-sw-item {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  translate: 0 8px;
  transition: opacity .2s ease, translate .2s ease, visibility 0s .2s;
}

.dh-sw-item.is-active {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
  transition: opacity .4s .12s ease, translate .4s .12s var(--dh-sw-ease), visibility 0s;
}

.dh-sw-name {
  overflow: hidden;
  color: var(--dh-sw-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Vorschaubilder */
.dh-sw-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 7px;
}

.dh-sw .dh-sw-thumb {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cfcbc4;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: translate .25s var(--dh-sw-ease), box-shadow .25s ease, border-color .25s ease;
}

.dh-sw .dh-sw-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: scale .4s var(--dh-sw-ease);
}

.dh-sw .dh-sw-thumb:hover {
  translate: 0 -2px;
  box-shadow: 0 4px 10px rgba(23, 23, 23, .16);
}

.dh-sw .dh-sw-thumb:hover img {
  scale: 1.06;
}

.dh-sw .dh-sw-thumb.is-active {
  border-color: var(--dh-sw-accent);
  box-shadow: 0 0 0 2px var(--dh-sw-accent);
}

/* Knopf und Links. :link/:visited ausdrücklich, weil das Theme „.et_pb_widget a:visited“ fast schwarz färbt (stärker als eine Klasse). */
.dh-sw a.dh-sw-cta:link,
.dh-sw a.dh-sw-cta:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 4px;
  background: var(--dh-sw-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background .2s ease, translate .25s var(--dh-sw-ease), box-shadow .25s ease;
}

.dh-sw a.dh-sw-cta:hover,
.dh-sw a.dh-sw-cta:focus-visible {
  background: var(--dh-sw-accent-hover);
  color: #fff;
  translate: 0 -1px;
  box-shadow: 0 6px 14px rgba(135, 0, 84, .3);
}

.dh-sw-arrow {
  flex: none;
  transition: translate .25s var(--dh-sw-ease);
}

.dh-sw-cta:hover .dh-sw-arrow {
  translate: 4px 0;
}

.dh-sw-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
  margin-top: 7px;
}

.dh-sw .dh-sw-links a:link,
.dh-sw .dh-sw-links a:visited {
  color: var(--dh-sw-accent);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dh-sw .dh-sw-links a:hover,
.dh-sw .dh-sw-links a:focus-visible {
  color: var(--dh-sw-accent-hover);
  text-decoration-thickness: 2px;
}

.dh-sw-note {
  margin-top: 5px;
  color: var(--dh-sw-muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.dh-sw a:focus-visible,
.dh-sw button:focus-visible {
  outline: 2px solid var(--dh-sw-accent);
  outline-offset: 2px;
}

@keyframes dh-sw-cover {
  from {
    opacity: 0;
    translate: -14% 6%;
    rotate: -12deg;
  }
}

@keyframes dh-sw-pop {
  from {
    opacity: 0;
    scale: .6;
  }
}

@keyframes dh-sw-float {
  50% {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dh-sw *,
  .dh-sw.is-running .dh-sw-cover,
  .dh-sw.is-running .dh-sw-badge {
    animation: none !important;
    transition: none !important;
  }
}
