/* =========================================
   3. SUCCESS ANIMATION OVERLAY
   ========================================= */
.success-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Background gelap transparan */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    backdrop-filter: blur(5px); /* Efek blur di belakang */
}

/* Class aktif saat JS dijalankan */
.success-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efek membal (bouncy) */
    max-width: 90%;
    width: 400px;
}

.success-overlay.active .success-content {
    transform: scale(1);
}

.success-content h3 {
    font-size: 1.8rem;
    color: #111;
    margin: 20px 0 10px;
    font-weight: 700;
}

.success-content p {
    color: #666;
    font-size: 0.95rem;
}

/* --- SVG CHECKMARK ANIMATION --- */
.checkmark-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--primary-color);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--primary-color);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Keyframes Animasi */
@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 50px var(--primary-color); }
}