/* Newsletter (no-iframe) – Apple-like, minimal, responsive */

.wes-newsletter{
  margin: var(--wb-space-4, 24px) 0;
}

.wes-newsletter__inner{
  padding: clamp(16px, 2.2vw, 22px);
}

.wes-newsletter__title{
  margin: 0 0 6px;
}

.wes-newsletter__text{
  margin: 0 0 14px;
  color: var(--wes-muted, #6b7280);
}

/* Inline / compact variant (Startseite CTA) */
.wes-newsletter--inline{
  margin-top: 14px;
}
.wes-newsletter--inline .wes-newsletter__inner{
  padding: 14px 16px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 12px 18px;
}
.wes-newsletter--inline .wes-newsletter__title{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.wes-newsletter--inline .wes-newsletter__text{
  margin: 0;
  font-size: 13px;
  max-width: 52ch;
}
.wes-newsletter--inline .wes-notice{
  flex: 1 1 100%;
  margin: 0;
}
.wes-newsletter--inline .wes-newsletter__form{
  margin-left: auto;
  flex: 1 1 340px;
  max-width: 560px;
}
.wes-newsletter--inline .wes-newsletter__grid{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.wes-newsletter--inline .wes-newsletter__grid .wes-form__row{
  margin: 0;
  flex: 1 1 240px;
}
.wes-newsletter--inline .wes-newsletter__actions{
  margin-top: 0;
}
.wes-newsletter--inline .wes-newsletter__consent{
  margin-top: 0;
}
.wes-newsletter--inline .wes-form__check{
  font-size: 12px;
}
@media (max-width: 720px){
  .wes-newsletter--inline .wes-newsletter__form{ margin-left: 0; max-width: 100%; }
  .wes-newsletter--inline .wes-newsletter__grid .wes-form__row{ flex: 1 1 100%; }
}

/* Quick visual anchor when the floating CTA scrolls to the form */
.wes-newsletter.is-highlight{
  box-shadow: 0 0 0 6px rgba(217,122,43,.14);
  border-radius: var(--wb-radius-l, 22px);
}

/* Legacy layouts */
.wes-newsletter__grid.is-email{
  grid-template-columns: 1fr;
}

@media (min-width: 720px){
  .wes-newsletter__grid.is-name{
    grid-template-columns: 1fr 1fr;
  }
}

/* Public/Interessenten: use the shared 2-col form grid; span specific rows */
.wes-newsletter__row--span{
  grid-column: 1 / -1;
}

.wes-newsletter__hp{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.wes-newsletter__actions{
  align-items: center;
}

.wes-newsletter__btn{
  min-height: var(--wb-control-h, 44px);
  cursor: pointer;
  transition: transform var(--wb-dur-2, 180ms) var(--wb-ease, ease);
}

.wes-newsletter__btn[disabled],
.wes-newsletter__btn:disabled{
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

.wes-newsletter__form.is-loading .wes-newsletter__btn{
  opacity: .85;
}

/* Field-level feedback (Apple-like, subtle) */
.wes-newsletter .wes-form__input.is-invalid{
  border-color: rgba(220,38,38,.45);
  box-shadow: 0 0 0 4px rgba(220,38,38,.08);
}

.wes-newsletter .wes-form__check input.is-invalid{
  outline: 3px solid rgba(220,38,38,.20);
  outline-offset: 3px;
  border-radius: 6px;
}


/* --------------------------------------------------------------------------
   Floating Newsletter CTA (Startseite) – subtle, Apple-like
   - Default: Edge-Button links, Icon-only, fährt erst spät ein.
   - Layouts: data-layout="edge" | data-layout="pill"
   - Mobile: data-mobile="edge" | data-mobile="chip" | off (via class is-mobile-off)
   -------------------------------------------------------------------------- */

.wes-nl-float{
  position: fixed;
  left: 0;
  top: var(--wes-nl-float-top, 60%);
  transform: translate3d(-120%, -50%, 0);
  opacity: 0;
  z-index: 9998;
  pointer-events: none;
  transition:
    transform var(--wb-dur-3, 280ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1)),
    opacity var(--wb-dur-2, 180ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1));
}

.wes-nl-float.is-visible{
  opacity: 1;
  transform: translate3d(var(--wes-nl-float-left, 10px), -50%, 0);
  pointer-events: auto; /* parent becomes clickable only when visible */
}

.wes-nl-float__btn{
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 14px;
  background: var(--wes-nl-float-bg, var(--wb-glass, rgba(255,255,255,.72)));
  border: 1px solid var(--wes-nl-float-border, rgba(15, 122, 76, .28));
  box-shadow: var(--wb-shadow-s, 0 6px 18px rgba(0,0,0,.08));
  backdrop-filter: blur(var(--wes-nl-float-blur, 14px));
  -webkit-backdrop-filter: blur(var(--wes-nl-float-blur, 14px));
  color: var(--wb-text, #0b0f0d);
  font: inherit;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  transition:
    max-width var(--wb-dur-3, 280ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1)),
    transform var(--wb-dur-2, 180ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1)),
    box-shadow var(--wb-dur-2, 180ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1)),
    border-color var(--wb-dur-2, 180ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1));
}

.wes-nl-float__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transform: translateY(-.5px);
  flex: 0 0 auto;
}

.wes-nl-float__icon svg{
  width: 18px;
  height: 18px;
  display: block;
}

.wes-nl-float__label{
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity var(--wb-dur-2, 180ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1)),
    transform var(--wb-dur-2, 180ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1));
}

.wes-nl-float__dot{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wes-nl-float-accent, var(--wb-accent, #d97a2b));
  box-shadow: 0 0 0 4px rgba(217,122,43,.12);
}

.wes-nl-float[data-dot="0"] .wes-nl-float__dot{ display:none; }

/* Edge layout (default) */
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn{
  height: 44px;
  width: 44px;          /* truly square (icon-only) */
  max-width: 44px;
  padding: 0;
  gap: 0;
  justify-content: center;
  /* Closed edge state: force envelope icon visibility (some themes override link/button colors). */
  color: #0b0f0d !important;
  background: rgba(255,255,255,.66);
}

/* Edge layout: truly icon-only when collapsed (no label width) */
.wes-nl-float[data-layout="edge"]:not(.is-expanded):not(.is-peek) .wes-nl-float__label{ display: none !important; }

.wes-nl-float[data-layout="edge"] .wes-nl-float__icon{ opacity: 1; }
.wes-nl-float[data-layout="edge"]:not(.is-expanded):not(.is-peek) .wes-nl-float__icon{
  /* Closed icon-only state: force high contrast on light glass background. */
  color: var(--wes-nl-float-icon-closed, rgba(11,107,58,.95)) !important;
}
.wes-nl-float[data-layout="edge"] .wes-nl-float__icon svg{
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
  stroke: currentColor !important;
  opacity: 1 !important;
}

/* Bulletproof icon color: some themes force svg/path stroke to white. Override on all children. */
.wes-nl-float[data-layout="edge"]:not(.is-expanded):not(.is-peek) .wes-nl-float__icon svg,
.wes-nl-float[data-layout="edge"]:not(.is-expanded):not(.is-peek) .wes-nl-float__icon svg *{
  stroke: var(--wes-nl-float-icon-closed, rgba(11,107,58,.95)) !important;
  fill: none !important;
}

.wes-nl-float[data-layout="edge"].is-expanded .wes-nl-float__icon svg,
.wes-nl-float[data-layout="edge"].is-expanded .wes-nl-float__icon svg *{
  stroke: currentColor !important;
}


/* When expanded (label visible), let the icon follow the normal text color for a calmer look. */
.wes-nl-float[data-layout="edge"].is-expanded .wes-nl-float__icon,
.wes-nl-float[data-layout="edge"].is-peek .wes-nl-float__icon,
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn:hover .wes-nl-float__icon,
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn:focus-visible .wes-nl-float__icon{
  color: var(--wb-text, #0b0f0d) !important;
}


.wes-nl-float[data-layout="edge"][data-dot="1"] .wes-nl-float__dot{
  opacity: 0; /* hidden until expanded */
}

.wes-nl-float[data-layout="edge"].is-expanded .wes-nl-float__btn,
.wes-nl-float[data-layout="edge"].is-peek .wes-nl-float__btn,
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn:hover,
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn:focus-visible{
  max-width: 220px;
  width: auto;
  padding: 0 34px 0 14px;
  gap: 10px;
  justify-content: flex-start;
  border-color: rgba(15, 122, 76, .45);
  box-shadow: var(--wb-shadow-m, 0 14px 40px rgba(0,0,0,.10));
  transform: translateY(-1px);
}

.wes-nl-float[data-layout="edge"].is-expanded .wes-nl-float__label,
.wes-nl-float[data-layout="edge"].is-peek .wes-nl-float__label,
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn:hover .wes-nl-float__label,
.wes-nl-float[data-layout="edge"] .wes-nl-float__btn:focus-visible .wes-nl-float__label{
  opacity: 1;
  transform: translateX(0);
}

.wes-nl-float[data-layout="edge"].is-expanded[data-dot="1"] .wes-nl-float__dot{
  opacity: 1;
}

/* Pill layout (legacy) */
.wes-nl-float[data-layout="pill"] .wes-nl-float__btn{
  padding: 10px 34px 10px 12px;
  border-radius: var(--wb-radius-pill, 999px);
  max-width: 48px; /* collapsed */
}

.wes-nl-float[data-layout="pill"].is-expanded .wes-nl-float__btn,
.wes-nl-float[data-layout="pill"].is-peek .wes-nl-float__btn,
.wes-nl-float[data-layout="pill"] .wes-nl-float__btn:hover,
.wes-nl-float[data-layout="pill"] .wes-nl-float__btn:focus-visible{
  max-width: 220px;
  border-color: rgba(15, 122, 76, .45);
  box-shadow: var(--wb-shadow-m, 0 14px 40px rgba(0,0,0,.10));
  transform: translateY(-1px);
}

.wes-nl-float[data-layout="pill"].is-expanded .wes-nl-float__label,
.wes-nl-float[data-layout="pill"].is-peek .wes-nl-float__label,
.wes-nl-float[data-layout="pill"] .wes-nl-float__btn:hover .wes-nl-float__label,
.wes-nl-float[data-layout="pill"] .wes-nl-float__btn:focus-visible .wes-nl-float__label{
  opacity: 1;
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce){
  .wes-nl-float, .wes-nl-float__btn, .wes-nl-float__label{ transition: none !important; }
}

/* Mobile: optional bottom chip (better reachability) */
@media (max-width: 720px){
  .wes-nl-float.is-mobile-off{ display:none !important; }

  .wes-nl-float[data-mobile="chip"]{
    left: 50%;
    top: auto;
    bottom: var(--wes-nl-float-bottom, 14px);
    transform: translate3d(-50%, 120%, 0);
    opacity: 0;
  }

  .wes-nl-float[data-mobile="chip"].is-visible{
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
  }

  .wes-nl-float[data-mobile="chip"] .wes-nl-float__btn{
    border-radius: var(--wb-radius-pill, 999px);
    max-width: 240px;
    padding: 10px 34px 10px 12px;
    height: auto;
  }

  .wes-nl-float[data-mobile="chip"] .wes-nl-float__label{ opacity: 1; transform: none; }
}


/* Panel (optional) */
.wes-nl-panel[hidden]{ display:none; }
.wes-nl-panel{
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: clamp(14px, 3vw, 24px);
  /* iOS: Notch/Home-Indicator nicht überlappen. */
  padding-top: max(clamp(14px, 3vw, 24px), env(safe-area-inset-top, 0px));
  padding-bottom: max(clamp(14px, 3vw, 24px), env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.wes-nl-panel__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* Hintergrund-Scroll auf Touch-Geräten nicht an die Seite durchreichen. */
  touch-action: none;
}
.wes-nl-panel__card{
  position: relative;
  width: min(480px, 92vw);
  /* iOS Safari: 100vh ist der "große" Viewport (Toolbars ausgeblendet).
     dvh folgt dem tatsächlich sichtbaren Viewport, daher wird die Karte
     nie höher als der sichtbare Bereich – der Submit bleibt erreichbar. */
  max-height: 86vh;
  max-height: min(86vh, calc(100dvh - 28px - env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* Scrollen übernimmt __inner; die Kopfzeile bleibt fix. */
  overscroll-behavior: contain;
  padding: 0;              /* reduce perceived layers */
  margin-left: 46px;       /* aligns visually with left tab */
  transform: translateX(-10px);
  opacity: 0;
  transition: transform var(--wb-dur-3, 280ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1)), opacity var(--wb-dur-3, 280ms) var(--wb-ease-out, cubic-bezier(.16,1,.3,1));
}
.wes-nl-panel.is-open .wes-nl-panel__card{
  transform: translateX(0);
  opacity: 1;
}

.wes-nl-panel__bar{
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 8px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wes-nl-panel__barTitle{
  font-weight: 650;
  font-size: 15px;
  line-height: 1.2;
  color: var(--wb-text, #0b0f0d);
  opacity: .92;
}
.wes-nl-panel__card .wes-nl-panel__close{
  all: unset !important;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  padding: 0 !important;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  background: rgba(255,255,255,.24) !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  color: #0b0f0d !important;
}
.wes-nl-panel__card .wes-nl-panel__close svg{ display:block; }

.wes-nl-panel__close:hover{
  background: rgba(255,255,255,.35);
}
.wes-nl-panel__inner{
  padding: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 720px){
  .wes-nl-panel{ justify-content: center; }
  .wes-nl-panel__card{ margin-left: 0; width: min(520px, 94vw); }
}
