/* Verkaufsguide – Sticky CTA: Bottom-Bar 1:1 wie Startseite (CTA_Leiste.html); Desktop-Sidebar nur bei Artikeln */

#hgStickyCta {
  --hg-orange: #ff911d;
  --hg-orange-dark: #e67e17;
  --hg-sticky-bar-brd: rgba(255, 255, 255, 0.12);
  --hg-sticky-text-muted: #dbe3f2;
}

#hgStickyCta *,
#hgStickyCta *::before,
#hgStickyCta *::after {
  box-sizing: border-box;
}

#hgStickyCta.hg-sticky-cta--sidebar .hg-sticky-cta__text {
  display: none !important;
}

/* —— Bottom-Bar (Startseite 1:1) —— */
#hgStickyCta:not(.hg-sticky-cta--sidebar),
#hgStickyCta[data-hg-sticky-bottom-only] {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(2.5mm, env(safe-area-inset-bottom));
  transform: translate(-50%, 120%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.36s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.28s ease, visibility 0.28s;
  z-index: 10040;
  width: calc(100% - 5mm);
  max-width: none;
  pointer-events: none;
  filter: none !important;
  -webkit-filter: none !important;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar).is-visible,
#hgStickyCta[data-hg-sticky-bottom-only].is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner,
#hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 8px 11px;
  border-radius: 12px;
  overflow: hidden;
  cursor: default;
  width: 100%;
  border: 1px solid var(--hg-sticky-bar-brd) !important;
  background-color: rgba(31, 35, 42, 0.88) !important;
  background-image:
    linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.03) 35%,
      rgba(180, 186, 196, 0.07) 50%,
      rgba(255, 255, 255, 0.04) 65%,
      rgba(255, 255, 255, 0.1) 100%
    ),
    linear-gradient(
      110deg,
      #2a2d33 0%,
      #454950 26%,
      #6a717c 50%,
      #3e4249 74%,
      #1e2024 100%
    ) !important;
  background-size: 240% 100%, 240% 100%;
  background-repeat: no-repeat, no-repeat;
  animation: hg-sticky-glass-shift 5s ease-in-out infinite;
  box-shadow:
    0 7px 20px rgba(0, 0, 0, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.1) inset !important;
  backdrop-filter: blur(8px) saturate(118%);
  -webkit-backdrop-filter: blur(8px) saturate(118%);
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner::after,
#hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 45%);
  opacity: 0.45;
  animation: hg-sticky-cta-glint 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__text,
#hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__text {
  display: block !important;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  color: var(--hg-sticky-text-muted) !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: clamp(12.8px, 1.1vw, 14.5px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 560;
  white-space: normal;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn,
#hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn:visited,
#hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn,
#hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn:visited {
  position: relative;
  z-index: 1;
  isolation: isolate;
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.56rem 1.25rem !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.90625rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  color: #fff !important;
  border: 1px solid rgba(255, 210, 170, 0.45) !important;
  background-color: var(--hg-orange-dark) !important;
  background-image: linear-gradient(
    110deg,
    var(--hg-orange-dark) 0%,
    var(--hg-orange) 28%,
    #ffc978 50%,
    var(--hg-orange) 72%,
    var(--hg-orange-dark) 100%
  ) !important;
  background-size: 240% 100% !important;
  background-repeat: no-repeat !important;
  animation: hg-sticky-cta-bar-move 5s ease-in-out infinite;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.2),
    0 6px 20px rgba(0, 0, 0, 0.18) !important;
  transition: transform 0.2s ease;
  outline: none !important;
  text-transform: none !important;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn::after,
#hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.35) 0%, transparent 45%);
  opacity: 0.5;
  animation: hg-sticky-cta-glint 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__btn-label,
#hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__btn-label {
  position: relative;
  z-index: 1;
}

#hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn:hover,
#hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn:focus-visible,
#hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn:hover,
#hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn:focus-visible {
  transform: translateY(-1px) scale(1.02);
  color: #fff !important;
  background-color: var(--hg-orange-dark) !important;
  background-image: linear-gradient(
    110deg,
    var(--hg-orange-dark) 0%,
    var(--hg-orange) 28%,
    #ffc978 50%,
    var(--hg-orange) 72%,
    var(--hg-orange-dark) 100%
  ) !important;
}

@keyframes hg-sticky-glass-shift {
  0%,
  100% {
    background-position: 8% 50%, 8% 50%;
  }
  50% {
    background-position: 92% 50%, 92% 50%;
  }
}

@keyframes hg-sticky-cta-bar-move {
  0%,
  100% {
    background-position: 8% 50%;
  }
  50% {
    background-position: 92% 50%;
  }
}

@keyframes hg-sticky-cta-glint {
  0%,
  100% {
    transform: translate(-12%, 0) rotate(12deg);
    opacity: 0.35;
  }
  50% {
    transform: translate(18%, 0) rotate(12deg);
    opacity: 0.65;
  }
}

@media (max-width: 760px) {
  #hgStickyCta:not(.hg-sticky-cta--sidebar),
  #hgStickyCta[data-hg-sticky-bottom-only] {
    width: calc(100% - 14px);
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner,
  #hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner {
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 11px;
    flex-wrap: nowrap;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__text,
  #hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__text {
    width: auto;
    margin: 0;
    font-size: 12.6px;
    text-align: left;
    line-height: 1.23;
    flex: 1 1 auto;
    min-width: 0;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn,
  #hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn {
    padding: 0.56rem 1.15rem !important;
    font-size: 0.875rem !important;
  }
}

/* Desktop: Button in linker Nav-Spalte (Artikel) */
@media (min-width: 961px) {
  #hgStickyCta.hg-sticky-cta--sidebar {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    z-index: 5;
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s;
  }

  #hgStickyCta.hg-sticky-cta--sidebar.is-visible {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #hgStickyCta.hg-sticky-cta--sidebar .hg-sticky-cta__inner {
    width: 100%;
    padding: 0;
    border: none !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    animation: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #hgStickyCta.hg-sticky-cta--sidebar .hg-sticky-cta__inner::after {
    display: none;
  }

  #hgStickyCta.hg-sticky-cta--sidebar a.hg-sticky-cta__btn,
  #hgStickyCta.hg-sticky-cta--sidebar a.hg-sticky-cta__btn:visited {
    width: 100%;
    white-space: normal;
    min-height: 46px;
    padding: 0.7rem 1rem !important;
    font-size: 0.875rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hgStickyCta:not(.hg-sticky-cta--sidebar),
  #hgStickyCta[data-hg-sticky-bottom-only] {
    transition: none;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner,
  #hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner::after,
  #hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn,
  #hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn::after,
  #hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner,
  #hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner::after,
  #hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn,
  #hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn::after {
    animation: none !important;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner,
  #hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner {
    background-size: 100% 100%, 100% 100% !important;
    background-position: 50% 50%, 50% 50% !important;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) .hg-sticky-cta__inner::after,
  #hgStickyCta[data-hg-sticky-bottom-only] .hg-sticky-cta__inner::after {
    opacity: 0.3;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn,
  #hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn {
    background-size: 100% 100% !important;
  }

  #hgStickyCta:not(.hg-sticky-cta--sidebar) a.hg-sticky-cta__btn::after,
  #hgStickyCta[data-hg-sticky-bottom-only] a.hg-sticky-cta__btn::after {
    opacity: 0.35;
  }
}
