
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #00000099;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.otp-title-con {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    min-width: 476px;
    gap: 20px;
    box-shadow: 0px 0px 48px 0px #0000000A;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.modal-title {
    color: #181E28;
 
    font-weight: 600;
    font-size: 20px;
    line-height: 150%;
    letter-spacing: -0.04em;
    text-align: center;
    margin-top: 0;
    margin-bottom: 4px;
}

.modal-subtitle {
    color: #7C828B;
 
    font-weight: 400;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 24px;
}

.otp-inputs {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    position: relative;
    z-index: 10;
}

.otp-inputs input {
    width: 56px;
    height: 56px;
    border-radius: 9.79px;
    border: 0.94px solid #E9EAEC;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    background: #fff;
    transition: border-color 0.2s;
}
.otp-inputs input:focus {
    border-color: #181E28;
}

.otp-inputs input.error {
    border-color: #E51818;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-2px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(2px, 0, 0);
    }
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.modal-footer-text {
    text-align: center;
    font-weight: 400;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: -0.02em;
    display: flex;
    justify-content: center;
    gap: 2px;
}
.footer-dark {
    color: #252E3D;
}
.footer-light {
    color: #7C828B;
}

.close-cta {
    display: none;
}

.resend-con {
    display: flex;
    gap: 12px;
}

.resend-cta {
    display: flex;
    gap: 4px;
    background-color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #E9EAEC;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.resend-cta.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.state-title-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.state-title-con {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.modal-cta {
    display: flex;
    width: 100%;
    min-width: 148px;
    padding: 8px 12px;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: #E51818;
    border-radius: 8px;
    box-shadow: 0px 4px 12px 0px #0000001F;
    cursor: pointer;
}

.modal-content-state {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    max-width: 404px;
    gap: 32px;
    box-shadow: 0px 0px 48px 0px #0000000A;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mobile Bottom Sheet Styles */
@media screen and (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end;
        height: 100%;
        position: fixed;
        bottom: 0;
    }
    
    /* Special handling for OTP modal */
    .otp-modal {
        position: fixed;
        height: 100%;
        bottom: 0;
        left: 0;
        right: 0;
        /* Prevent iOS Safari from adjusting the viewport when keyboard appears */
        height: calc(100% + 1px);
    }
    
    .otp-modal-content {
        /* Fix position at bottom */
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        /* Prevent content from being pushed by virtual keyboard */
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
        /* Hardware acceleration */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .modal-content {
        width: 100%;
        min-width: unset;
        border-radius: 16px 16px 0 0;
        padding: 24px 16px;
        box-sizing: border-box;
        max-height: 80vh;
        overflow-y: auto;
        animation: slideUp 0.3s ease-out;
        /* Prevent content from being pushed by virtual keyboard */
        position: relative;
        z-index: 1001;
    }

    .modal-content-state {
        width: 100%;
        max-width: unset;

        border-radius: 16px 16px 0 0;
        padding: 24px 16px;
        box-sizing: border-box;
        max-height: 80vh;
        overflow-y: auto;
        animation: slideUp 0.3s ease-out;
    }
    
    .close-btn {
        display: none;
    }
    
    .otp-inputs {
        width: 100%;
        justify-content: center;
    }
    
    .otp-inputs input {
        width: 45px;
    }

    .close-cta {
        position: absolute;
        top: -57px;
        left: 50%;
        display: flex;
        transform: translateX(-50%);
        height: 40px;
        width: 40px;
        background-color: #252E3D;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}