﻿
.otp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(5px);

    padding: 20px;
    overflow-y: auto;
}

.otp-modal {
    width: 430px;
    background: white;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    animation: otpShow .25s ease;
    box-shadow: 0 25px 80px rgba(0,0,0,.22);

    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

@keyframes otpShow {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.otp-close-btn {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 34px;
    height: 34px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: .2s;
}

    .otp-close-btn:hover {
        background: #ececec;
    }

.otp-modal-header {
    padding: 35px 35px 20px;
    text-align: center;
}

.otp-icon-circle {
    width: 84px;
    height: 84px;
    margin: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #2f6fed;
    font-size: 36px;
    margin-bottom: 20px;
    transition: .4s;
    box-shadow: 0 10px 30px rgba(47,111,237,.18);
}

    .otp-icon-circle.success {
        background: #e9f9ee;
        color: #28a745;
        transform: scale(1.08);
    }

.otp-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.otp-description {
    color: #777;
    line-height: 1.8;
    font-size: 14px;
}

.otp-modal-body {
    padding: 0 35px 20px;
    text-align: center;
    overflow-y: auto;
}

.otp-input {
    width: 240px;
    height: 60px;
    border: 1px solid #dce1ea;
    border-radius: 16px;
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 12px;
    transition: .2s;
}

    .otp-input:focus {
        outline: none;
        border-color: #2f6fed;
        box-shadow: 0 0 0 4px rgba(47,111,237,.12);
    }

.otp-error {
    min-height: 20px;
    margin-top: 15px;
    color: #dc3545;
    font-size: 13px;
}

.otp-timer-wrapper {
    margin-top: 18px;
}

#otp-countdown {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
}

.btn-resend-otp {
    border: none;
    background: none;
    color: #2f6fed;
    font-weight: 600;
    cursor: pointer;
}

    .btn-resend-otp:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.otp-modal-footer {
    padding: 0 35px 35px;
}

.otp-btn {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    position: relative;
}

.verify-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.otp-open {
    overflow: hidden;
}

.otp-input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220,53,69,.12);
}

.otp-icon-circle.error {
    background: #fff1f2;
    color: #dc3545;
    box-shadow: 0 10px 30px rgba(220,53,69,.15);
}

@keyframes shakeOtp {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }

    100% {
        transform: translateX(0);
    }
}

.otp-shake {
    animation: shakeOtp .35s ease;
}

.otp-input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220,53,69,.12);
    animation: otpShake .35s ease;
}

.otp-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}


.otp-member-email {
    font-size: 15px;
    font-weight: 600;
    color: #2563eb;
    word-break: break-word;
}


#otp-icon-circle.animated {
    animation: popSuccess .4s ease;
}

#otp-icon.bounce {
    animation: bounceCheck .6s ease;
}

.success-state {
    position: relative;
    overflow: hidden;
}

.redirect-loader {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.5);
    border-top: 2px solid #fff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    animation: spin .7s linear infinite;
}

.otp-progress-wrapper {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 14px;
}

#otp-redirect-progress {
    width: 0%;
    height: 100%;
    background: #22c55e;
    display: none;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes popSuccess {
    0% {
        transform: scale(.7);
        opacity: .5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceCheck {
    0% {
        transform: scale(.5);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {

    .otp-modal {
        border-radius: 18px;
        max-height: calc(100vh - 24px);
    }

    .otp-modal-header {
        padding: 24px 20px 16px;
    }

    .otp-modal-body {
        padding: 0 20px 16px;
    }

    .otp-modal-footer {
        padding: 16px 35px 35px;
        background: white;
        position: sticky;
        bottom: 0;
        z-index: 2;
    }

    .otp-title {
        font-size: 22px;
    }

    .otp-description {
        font-size: 13px;
        line-height: 1.6;
    }

    .otp-icon-circle {
        width: 68px;
        height: 68px;
        font-size: 28px;
        margin-bottom: 16px;
    }
}