:root {
    --ripples-primary-async-color: #8b5cf6;
}

#async-login * {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

#async-login {
    .login-popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        z-index: 1000000;
        align-items: center;
        justify-content: center;
    }

    .login-popup {
        background: white;
        border-radius: 10px;
        padding: 2rem;
        width: 90%;
        max-width: 400px;
        position: relative;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        animation: slideIn 0.3s ease-out;
    }

    .close-button {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        padding: 5px 10px;
        border-radius: 50%;
        transition: background 0.3s;
    }

    .close-button:hover {
        background: #f5f5f5;
    }

    .login-content {
        text-align: center;
    }

    .login-step {
        display: none;
    }

    .login-step.active {
        display: block;
        animation: fadeIn 0.3s ease-out;
    }

    .login-content h2 {
        margin: 0;
        color: #333;
        font-size: 24px;
        font-weight: 600;
    }

    .login-content p {
        color: #666;
        margin: 10px 0px;
        font-size: 12px;
    }

    .email-display {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;
        padding: 8px 16px;
        background: #f5f7fa;
        border-radius: 8px;
    }

    .email-text {
        color: #333;
        font-weight: 500;
        font-size: 15px;
    }

    .edit-email-button {
        background: none;
        border: none;
        color: var(--ripples-primary-async-color);
        cursor: pointer;
        padding: 4px 8px;
        font-size: 14px;
        border-radius: 4px;
        transition: background 0.3s;
    }

    .edit-email-button:hover {
        background: rgba(74, 144, 226, 0.1);
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 14px;
        transition: border-color 0.3s;
        box-sizing: border-box;
    }

    .form-group input:focus {
        border-color: var(--ripples-primary-async-color);
        outline: none;
    }

    .otp-inputs {
        display: flex;
        gap: 10px;
        justify-content: center;
        margin: 20px 0;
    }

    .otp-inputs input {
        width: 45px;
        height: 45px;
        text-align: center;
        font-size: 18px;
        border: 1px solid #ddd;
        border-radius: 8px;
        transition: all 0.3s;
    }

    .otp-inputs input:focus {
        border-color: var(--ripples-primary-async-color);
        outline: none;
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
    }

    .async-login-whatsapp-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .send-otp-button {
        width: 100%;
        padding: 12px;
        background: #3ab93a;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.3s;
    }

    .success-modal {
        text-align: center;
        padding: 20px;
    }

    .success-animation {
        width: 80px;
        height: 80px;
        margin: 20px auto;
        border-radius: 50%;
        background: #4bb543;
        position: relative;
        animation: scaleIn 0.5s ease-out;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .checkmark {
        width: 40px;
        height: 40px;
        position: relative;
    }

    .checkmark::after {
        content: "";
        position: absolute;
        top: 45%;
        left: 25%;
        width: 25px;
        height: 12px;
        border: 4px solid white;
        border-top: 0;
        border-left: 0;
        transform: rotate(45deg);
        animation: checkmark 0.4s ease-in-out 0.2s forwards;
        opacity: 0;
        transform-origin: left top;
    }

    .success-message {
        margin-top: 20px;
        animation: fadeInUp 0.5s ease-out 0.3s both;
    }

    .success-message h2 {
        color: #2d3748;
        margin-bottom: 10px;
    }

    .success-message p {
        color: #718096;
        font-size: 16px;
    }

    .resend-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
    }

    .resend-link {
        color: var(--ripples-primary-async-color);
        text-decoration: none;
        font-size: 14px;
        padding: 4px 8px;
        border-radius: 4px;
        transition: all 0.3s;
    }

    .resend-link.disabled {
        color: #a0aec0;
        cursor: not-allowed;
    }

    .resend-link:not(.disabled):hover {
        background: rgba(74, 144, 226, 0.1);
    }

    .timer {
        font-size: 14px;
        color: #718096;
    }

    .enter-mail-text {
        margin: 10px 0px;
    }

    .login-tabs {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
    }

    .tab-button {
        flex: 1;
        padding: 10px;
        font-size: 12px;
        border: 1px solid #ddd;
        background: none;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .tab-button.active {
        background: #3ab93a;
        color: white;
        border-color: #3ab93a;
    }

    #async-login-phone {
        display: none;
    }

    @keyframes checkmark {
        0% {
            opacity: 0;
            transform: rotate(45deg) scale(0.8);
        }
        100% {
            opacity: 1;
            transform: rotate(45deg) scale(1);
        }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideIn {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    @keyframes scaleIn {
        from {
            transform: scale(0);
        }
        to {
            transform: scale(1);
        }
    }

    @media (max-width: 480px) {
        .login-popup {
            padding: 1.5rem;
        }
    }

    #async-login-error-message {
        color: red;
        padding: 0px;
        margin: 0px;
    }
}
