﻿
.success-checkmark {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    margin: 40px auto;
    border: 4px solid #4CAF50;
    border-top-color: transparent;
    animation: spin 1s linear forwards;
}

.check-icon {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeIn 0.4s ease forwards;
    animation-delay: 1s; /* wait for spin to finish */
}

/* checkmark lines */
.icon-line {
    height: 7px;
    background-color: #4CAF50;
    display: block;
    border-radius: 2px;
    position: absolute;
    transform-origin: left center;
    opacity: 0;
}

/* the short tip */
.line-tip {
    width: 25px;
    top: 47%;
    left: 25%;
    transform: rotate(45deg);
    animation: drawTip 0.3s ease forwards;
    animation-delay: 1.1s;
}

/* the long line */
.line-long {
    width: 47px;
    top: 67%;
    left: 40%;
    transform: rotate(-45deg);
    animation: drawLong 0.3s ease forwards;
    animation-delay: 1.3s;
}



.fail-xmark {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    margin: 40px auto;
    border: 4px solid #f44336;
    border-top-color: transparent;
    animation: spinX 1s linear forwards;
}

.x-icon {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeIn 0.4s ease forwards;
    animation-delay: 1s;
}

.x-line {
    height: 7px;
    background-color: #f44336;
    border-radius: 2px;
    position: absolute;
    opacity: 0;
    top: 49%;
    left: 24%;
}

.x-line1 {
    width: 50px;
    transform: rotate(45deg);
    animation: drawX 0.3s ease forwards;
    animation-delay: 1.1s;
}

.x-line2 {
    width: 50px;
    transform: rotate(-45deg);
    animation: drawX 0.3s ease forwards;
    animation-delay: 1.3s;
}

/* Waiting */
.waiting-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 40px auto;
    border: 4px solid #FFC107; /* yellow */
    border-top-color: transparent; /* "gap" for spinner effect */
    animation: spinW 1s linear infinite;
}
/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
        border-color: #4CAF50;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawTip {
    0% {
        width: 0;
        opacity: 1;
    }

    100% {
        width: 25px;
        opacity: 1;
    }
}

@keyframes drawLong {
    0% {
        width: 0;
        opacity: 1;
    }

    100% {
        width: 47px;
        opacity: 1;
    }
}


@keyframes drawX {
    0% {
        width: 0;
        opacity: 1;
    }

    100% {
        width: 50px;
        opacity: 1;
    }
}

@keyframes spinX {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
        border-color: #f44336;
    }
}

@keyframes spinW {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
