/* =========================================================
   PFLEGEKOLLEKTIV CAPACITY BADGE
========================================================= */

.pk-capacity-badge {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 14px;

    overflow: hidden;

    border-radius: 999px;

    font-weight: 800;
    line-height: 1;

    letter-spacing: .01em;

    isolation: isolate;

    transform: translateZ(0);

    animation:
        pkCapacityFloat
        4.5s
        ease-in-out
        infinite;
}


/* =========================================================
   SIZE
========================================================= */

.pk-capacity-badge--sm {
    padding: 9px 14px;

    font-size: 12px;
}


.pk-capacity-badge--md {
    padding: 13px 21px;

    font-size: 14px;
}


.pk-capacity-badge--lg {
    gap: 16px;

    min-height: 62px;

    padding:
        18px
        88px
        18px
        27px;

    font-size: 17px;

    border-radius: 999px;
}


/* =========================================================
   AVAILABLE
========================================================= */

.pk-capacity-badge.is-available {
    color: #0b2942;

    background:
        linear-gradient(
            135deg,
            #ffb47f 0%,
            #f3985a 55%,
            #df7e3f 100%
        );

    box-shadow:
        0 14px 40px rgba(255, 255, 255, .32);
}


/* subtle moving light */

.pk-capacity-badge.is-available::before {
    content: "";

    position: absolute;

    width: 90px;
    height: 200%;

    left: -90px;
    top: -50%;

    z-index: -1;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, .55),
            transparent
        );

    transform: rotate(18deg);

    animation:
        pkCapacityShine
        5.5s
        ease-in-out
        infinite;
}


/* =========================================================
   UNAVAILABLE
========================================================= */

.pk-capacity-badge.is-unavailable {
    color: #1e2a38;

    background:
        linear-gradient(
            135deg,
            #000,
            #f4995b
        );

    box-shadow:
        0 12px 35px #ffffff;
}


/* =========================================================
   SIGNAL
========================================================= */

.pk-capacity-badge__signal {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 14px;
    height: 14px;
}


.pk-capacity-badge__dot {
    position: relative;

    z-index: 3;

    display: block;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: currentColor;

    box-shadow:
        0 0 0 3px #ffffff;
}


/* =========================================================
   PULSE
========================================================= */

@keyframes pkCapacityPulse {

    0% {
        transform: scale(.55);
        opacity: .8;
    }

    65% {
        transform: scale(2.25);
        opacity: 0;
    }

    100% {
        transform: scale(2.25);
        opacity: 0;
    }

}


/* =========================================================
   TEXT
========================================================= */

.pk-capacity-badge__text {
    position: relative;

    z-index: 2;

    white-space: nowrap;
}


/* =========================================================
   LITTLE SPARKS
========================================================= */

.pk-capacity-badge__spark {
    position: relative;

    display: flex;
    align-items: center;

    gap: 3px;

    margin-left: 3px;
}


.pk-capacity-badge__spark span {
    display: block;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: currentColor;

    opacity: .35;

    animation:
        pkCapacitySpark
        1.5s
        ease-in-out
        infinite;
}


.pk-capacity-badge__spark span:nth-child(2) {
    animation-delay: .18s;
}


.pk-capacity-badge__spark span:nth-child(3) {
    animation-delay: .36s;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes pkCapacityPulse {

    0% {
        transform: scale(.65);
        opacity: .65;
    }

    75% {
        transform: scale(1.9);
        opacity: 0;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }

}


@keyframes pkCapacityFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

}


@keyframes pkCapacityShine {

    0%,
    35% {
        left: -110px;
        opacity: 0;
    }

    43% {
        opacity: .9;
    }

    62% {
        left: calc(100% + 110px);
        opacity: 0;
    }

    100% {
        left: calc(100% + 110px);
        opacity: 0;
    }

}


@keyframes pkCapacitySpark {

    0%,
    100% {
        transform: scale(.7);
        opacity: .25;
    }

    50% {
        transform: scale(1.5);
        opacity: .85;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .pk-capacity-badge--lg {
        padding: 14px 20px;

        font-size: 14px;
    }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .pk-capacity-badge,
    .pk-capacity-badge::before,
    .pk-capacity-badge__pulse,
    .pk-capacity-badge__spark span {
        animation: none;
    }

}

/* =========================================================
   BRAND SYMBOL
========================================================= */

.pk-capacity-badge.is-available::after {
    content: "";

    position: absolute;

    width: 74px;
    height: 74px;

    right: 10px;
    top: 50%;

    z-index: 1;

    transform:
        translateY(-50%)
        rotate(-5deg);

    background: rgba(255, 255, 255, .38);

    -webkit-mask-image:
        var(--pk-capacity-symbol);

    mask-image:
        var(--pk-capacity-symbol);

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: contain;
    mask-size: contain;

    pointer-events: none;

    animation:
        pkCapacitySymbol
        5s
        ease-in-out
        infinite;
}

@keyframes pkCapacitySymbol {

    0%,
    100% {
        transform:
            translateY(-50%)
            translateX(0)
            rotate(-5deg)
            scale(.94);

        opacity: .45;
    }

    50% {
        transform:
            translateY(-50%)
            translateX(-4px)
            rotate(1deg)
            scale(1.06);

        opacity: .75;
    }

}
