.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s cubic-bezier(.4, 0, .2, 1), visibility .35s cubic-bezier(.4, 0, .2, 1);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.login-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.login-modal.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    padding: 2.5rem 2rem 2rem;
    max-width: 400px;
    width: 90vw;
    text-align: center;
    opacity: 0;
    transform: scale(.96) translateY(30px);
    transition: opacity .35s cubic-bezier(.4, 0, .2, 1), transform .35s cubic-bezier(.4, 0, .2, 1);
}

.login-modal.show .login-modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.login-modal.hide .login-modal-content {
    opacity: 0;
    transform: scale(.96) translateY(30px);
}

.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    color: #666;
    cursor: pointer;
    transition: color .2s;
}

.login-modal-close svg {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
}

.login-modal-close:hover {
    color: #212529;
}

.login-modal-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.login-modal-desc {
    font-size: .75rem;
    color: #81858b;
    font-weight: 500;
    margin: 0 0 1.5rem;
    text-align: center;
}

.login-modal-phone {
    color: #424750;
}

.login-modal-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    font-family: inherit;
    margin: 0 0 1rem;
    outline: 0;
    transition: border .2s;
    text-align: left;
    direction: ltr;
    box-sizing: border-box;
    background: #fff;
    color: #212529;
}

.login-modal-input::placeholder {
    text-align: left;
    direction: ltr;
    color: #999;
}

.login-modal-input.is-error {
    border-color: #dc3545;
}

.login-modal-input--otp {
    height: 48px;
    padding: 0 12px;
    border: 1px solid #c1c1c1;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
    direction: ltr;
    text-align: center;
}

.login-modal-input--otp.is-error {
    border-color: #d32f2f;
}

.login-modal-submit {
    width: 100%;
    background: #ef4056;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .75rem 0;
    font-size: .875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
}

.login-modal-submit:hover:not(:disabled) {
    background: #d63046;
}

.login-modal-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.login-modal-submit.is-loading,
.login-modal-submit:disabled.is-loading {
    opacity: 1;
    cursor: wait;
}

.login-error {
    color: #dc3545;
    font-size: .75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    min-height: 1.25rem;
}

.login-error:empty {
    min-height: 0;
    margin-bottom: .5rem;
}

.edit-phone-btn-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #008eb2;
    font-size: .75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    transition: color .15s ease;
}

.edit-phone-btn-info:hover {
    color: #007a9a;
}

.otp-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    margin: 1.5rem 0;
    direction: rtl;
}

.otp-resend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin: 0;
    padding: .5rem .875rem;
    border: none;
    border-radius: .75rem;
    background: #f0f0f0;
    color: #81858b;
    font-size: .75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.otp-resend-btn:disabled {
    background: #f0f0f0;
    color: #81858b;
    cursor: not-allowed;
}

.otp-resend-btn:not(:disabled):hover {
    background: #e8e8e8;
}

.otp-timer-count {
    display: inline-block;
    min-width: 40px;
    direction: ltr;
    text-align: center;
}

.otp-timer-count.is-hidden {
    display: none;
}

.login-btn-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.login-btn-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: block;
    animation: login-dot-pulse 1s infinite ease-in-out;
}

.login-btn-dots i:nth-child(2) {
    animation-delay: .15s;
}

.login-btn-dots i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes login-dot-pulse {
    0%,
    80%,
    100% {
        opacity: .35;
        transform: scale(.85);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .login-modal-content {
        padding: 2.5rem 1.25rem 1.5rem;
    }
}
