:root {
    --curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
    --green: #7ac142;
    --white: #fff;
}

.check>div {
    position: relative;
    display: inline-block;
    width: 40px; /* Anpassung der Wrapper-Größe */
    height: 40px; /* gleiche Größe wie die Nummer */
    padding: 0.5rem;
}

.cardFragecheckbox {
    display: none;
}

.cardFrageNummer {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 40px;
    width: 40px;
    transform: translate(-50%, -50%); /* Zentrierung */
    border-radius: 50%;
    border: solid var(--peak-color) 2px; /* Sicherstellen, dass var funktioniert */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Nummer über dem Checkmark */
    opacity: 1;
    transition: all 0.3s;
}

.cardFrageNummer > p {
    font-weight: bold;
    font-size: 14px; /* Schriftgröße anpassen */
    color: var(--peak-color);
}

.cardFragecheckbox:checked~.cardFrageNummer {
    opacity: 0;
}

.checkmark {
    opacity: 0;
    transition: all 0.3s;
    position: absolute;
    
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cardFragecheckbox:checked~.checkmark {
    position: absolute;
    z-index: 3;
    /* scale: 4; */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--white);
    stroke-miterlimit: 10;
    border: solid 2px var(--green);
    box-shadow: inset 0px 0px 0px var(--green);
    opacity: 1;
    
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.cardFragecheckbox:checked~.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--green);
    fill: none;
    animation: stroke 0.6s var(--curve) forwards;
}

.cardFragecheckbox:checked~.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s var(--curve) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: translate(-50%, -50%), scale3d(0);
    }
    50% {
        transform: translate(-50%, -50%), scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px var(--green);
    }
}