.dw-cta-button {
    display: flex;
    width: 100%;
    overflow: visible;
}

.dw-cta-button__wrap {
    --dw-cta-effect-color: #fff;
    --dw-cta-effect-opacity: 0.9;
    --dw-cta-animation-duration: 900ms;
    --dw-cta-shine-width: 34%;
    --dw-cta-glow-size: 26px;
    --dw-cta-ring-width: 2px;
    --dw-cta-bounce-distance: 4px;
    --dw-cta-bounce-distance-negative: -4px;
    --dw-cta-bounce-distance-small-negative: -1px;
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 12px;
    overflow: visible;
    isolation: isolate;
}

.dw-cta-button__wrap--width-full {
    display: block;
    width: 100%;
}

.dw-cta-button__wrap--width-full .dw-cta-button__button {
    width: 100%;
}

.dw-cta-button__button {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-radius: 12px;
    padding: 14px 28px;
    overflow: hidden;
    background: #3e79c5;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    vertical-align: middle;
    transition-property: color, background-color, background-image, border-color, border-radius, box-shadow, transform;
    transition-timing-function: ease;
}

.dw-cta-button__button:hover,
.dw-cta-button__button:focus,
.dw-cta-button__button:focus-visible {
    text-decoration: none;
}

.dw-cta-button__button--icon-right {
    flex-direction: row-reverse;
}

.dw-cta-button__text,
.dw-cta-button__icon {
    position: relative;
    z-index: 2;
}

.dw-cta-button__text {
    min-width: 0;
}

.dw-cta-button__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 200ms ease;
}

.dw-cta-button__icon i,
.dw-cta-button__icon svg {
    display: block;
    line-height: 1;
}

.dw-cta-button__icon svg {
    width: 1em;
    height: 1em;
    transition: fill 200ms ease;
}

/* Shared animation layers */
.dw-cta-button__button::before,
.dw-cta-button__wrap::after {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.dw-cta-button__button::before {
    z-index: 1;
    top: -35%;
    bottom: -35%;
    width: var(--dw-cta-shine-width);
    left: calc(0% - var(--dw-cta-shine-width) - 25%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--dw-cta-effect-color) 48%,
        var(--dw-cta-effect-color) 52%,
        transparent 100%
    );
    transform: skewX(-18deg);
    filter: opacity(var(--dw-cta-effect-opacity));
}

.dw-cta-button__wrap::after {
    z-index: 3;
    inset: 0;
    border-radius: inherit;
    box-sizing: border-box;
    filter: opacity(var(--dw-cta-effect-opacity));
}

/* 1. Lichtstreifen */
.dw-cta-button__wrap--animating[data-dw-animation="light-strip"] .dw-cta-button__button::before {
    animation: dw-cta-light-strip var(--dw-cta-animation-duration) cubic-bezier(.2, .7, .25, 1) 1;
}

@keyframes dw-cta-light-strip {
    0% {
        left: calc(0% - var(--dw-cta-shine-width) - 25%);
        opacity: 0;
    }
    12% {
        opacity: 0.5;
    }
    45% {
        opacity: 1;
    }
    88% {
        opacity: 0.55;
    }
    100% {
        left: calc(125% + var(--dw-cta-shine-width));
        opacity: 0;
    }
}

/* 2. Glow-Impuls */
.dw-cta-button__wrap--animating[data-dw-animation="glow-pulse"]::after {
    animation: dw-cta-glow-pulse var(--dw-cta-animation-duration) ease-out 1;
}

@keyframes dw-cta-glow-pulse {
    0%, 100% {
        opacity: 0;
        box-shadow: 0 0 0 0 var(--dw-cta-effect-color);
    }
    38% {
        opacity: 0.95;
        box-shadow: 0 0 var(--dw-cta-glow-size) 0 var(--dw-cta-effect-color);
    }
    62% {
        opacity: 0.7;
        box-shadow: 0 0 var(--dw-cta-glow-size) var(--dw-cta-ring-width) var(--dw-cta-effect-color);
    }
}

/* 3. Rand-Impuls */
.dw-cta-button__wrap--animating[data-dw-animation="border-pulse"]::after {
    border: var(--dw-cta-ring-width) solid var(--dw-cta-effect-color);
    animation: dw-cta-border-pulse var(--dw-cta-animation-duration) cubic-bezier(.2, .7, .25, 1) 1;
}

@keyframes dw-cta-border-pulse {
    0% {
        opacity: 0;
        transform: scale(0.985);
    }
    25% {
        opacity: 1;
    }
    65% {
        opacity: 0.65;
        transform: scale(1.045);
    }
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

/* 4. Ripple / Welle */
.dw-cta-button__wrap--animating[data-dw-animation="ripple"]::after {
    border: var(--dw-cta-ring-width) solid var(--dw-cta-effect-color);
    animation: dw-cta-ripple var(--dw-cta-animation-duration) cubic-bezier(.18, .7, .25, 1) 1;
}

@keyframes dw-cta-ripple {
    0% {
        opacity: 1;
        transform: scale(0.99);
    }
    65% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: scale(1.28);
    }
}

/* 5. Micro-Bounce + Lichtakzent */
.dw-cta-button__wrap--animating[data-dw-animation="micro-bounce"] {
    animation: dw-cta-micro-bounce var(--dw-cta-animation-duration) cubic-bezier(.2, .8, .3, 1) 1;
}

.dw-cta-button__wrap--animating[data-dw-animation="micro-bounce"]::after {
    background: linear-gradient(
        180deg,
        transparent 20%,
        var(--dw-cta-effect-color) 100%
    );
    mix-blend-mode: screen;
    animation: dw-cta-bounce-light var(--dw-cta-animation-duration) ease-out 1;
}

@keyframes dw-cta-micro-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    28% {
        transform: translateY(var(--dw-cta-bounce-distance-negative)) scale(1.015);
    }
    52% {
        transform: translateY(0) scale(0.995);
    }
    74% {
        transform: translateY(var(--dw-cta-bounce-distance-small-negative)) scale(1.004);
    }
}

@keyframes dw-cta-bounce-light {
    0%, 100% {
        opacity: 0;
    }
    28% {
        opacity: 0.34;
    }
    55% {
        opacity: 0.12;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dw-cta-button__button,
    .dw-cta-button__icon,
    .dw-cta-button__icon svg,
    .dw-cta-button__wrap,
    .dw-cta-button__wrap::after,
    .dw-cta-button__button::before {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
