@keyframes check-pop {
    0% {
        opacity: 0;
        transform: scale(0.45);
    }
    65% {
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes check-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes checkbox-mark-in {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.2);
    }
    70% {
        transform: rotate(45deg) scale(1.12);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

@keyframes checkbox-box-in {
    0% {
        transform: scale(0.92);
    }
    55% {
        transform: scale(1.04);
    }
    100% {
        transform: scale(1);
    }
}

.animated-check {
    display: block;
    width: 16px;
    height: 16px;
    color: rgb(255, 201, 100);
}

.animated-check-path {
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
}

.is-check-animated .animated-check {
    animation: check-pop 0.38s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.is-check-animated .animated-check-path {
    animation: check-draw 0.34s ease forwards 0.08s;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    margin: 0;
    flex: 0 0 18px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

input[type="checkbox"]::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid rgb(255, 201, 100);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transform-origin: center;
}

input[type="checkbox"]:hover {
    border-color: rgba(255, 201, 100, 0.35);
}

input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 201, 100, 0.25);
}

input[type="checkbox"]:checked {
    border-color: rgba(255, 201, 100, 0.65);
    background: rgba(255, 201, 100, 0.12);
    animation: checkbox-box-in 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

input[type="checkbox"]:checked::after {
    opacity: 1;
    animation: checkbox-mark-in 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

input[type="checkbox"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.verify-icon .verify-icon-pending {
    display: inline;
}

.verify-icon .animated-check {
    display: none;
}

.verify-step.is-complete .verify-icon .verify-icon-pending {
    display: none;
}

.verify-step.is-complete .verify-icon .animated-check {
    display: block;
    color: rgb(5, 248, 86);
    animation: check-pop 0.42s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.verify-step.is-complete .verify-icon .animated-check-path {
    animation: check-draw 0.36s ease forwards 0.1s;
}

@media (prefers-reduced-motion: reduce) {
    input[type="checkbox"]:checked,
    input[type="checkbox"]:checked::after,
    .is-check-animated .animated-check,
    .is-check-animated .animated-check-path,
    .verify-step.is-complete .verify-icon .animated-check,
    .verify-step.is-complete .verify-icon .animated-check-path {
        animation: none;
    }

    input[type="checkbox"]:checked::after {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }

    .animated-check-path,
    .verify-step.is-complete .verify-icon .animated-check-path {
        stroke-dashoffset: 0;
    }
}
