﻿/* =========================================================
   IDAA AUTH MODAL
   Login + Signup
========================================================= */


/* =========================
   OVERLAY
========================= */

.idaa-auth-overlay {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.72);
    z-index: 9998;
}


/* =========================
   MODAL WRAPPER
========================= */

.idaa-auth-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    overflow-y: auto;
}

    .idaa-auth-modal.show {
        display: flex !important;
    }


/* =========================
   MODAL CONTENT
========================= */

.idaa-auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto !important;
    background: #ffffff;
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
    color: #0b2948;
    animation: idaaAuthModalOpen 0.18s ease-out;
}

@keyframes idaaAuthModalOpen {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================
   HEADER
========================= */

.idaa-auth-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

    .idaa-auth-header h2 {
        margin: 0 0 5px 0;
        font-size: 28px;
        line-height: 1.2;
        font-weight: 700;
        color: #0b2948;
    }

    .idaa-auth-header p {
        margin: 0;
        font-size: 16px;
        color: #65758b;
    }


/* =========================
   CLOSE BUTTON
========================= */

.auth-close {
    border: none;
    outline: none;
    background: #f5f6f8;
    color: #ff4444;
    border-radius: 25px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

    .auth-close:hover {
        background: #eceef2;
    }


/* =========================
   BACK BUTTON
========================= */

.idaa-auth-back {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #65758b;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: 0.2s ease;
}

    .idaa-auth-back:hover {
        background: #f5f6f8;
        color: #102c4d;
    }

    .idaa-auth-back i {
        font-size: 18px;
    }


/* =========================
   INPUT WRAPPER
========================= */

.idaa-auth-input {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    border: 1px solid #d9e0e8;
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 0 16px;
    background: #ffffff;
    transition: 0.2s ease;
}

    .idaa-auth-input:focus-within {
        border-color: #4664f5;
        box-shadow: 0 0 0 3px rgba(70, 100, 245, 0.10);
    }


    /* =========================
   INPUT ICON
========================= */

    .idaa-auth-input > i {
        width: 24px;
        flex-shrink: 0;
        margin-right: 10px;
        font-size: 18px;
        color: #67788d;
    }


    /* =========================
   INPUT FIELD
========================= */

    .idaa-auth-input input {
        flex: 1;
        width: 100%;
        height: 100%;
        border: none !important;
        outline: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0;
        font-size: 16px;
        color: #102c4d;
    }

        .idaa-auth-input input::placeholder {
            color: #7c899b;
        }


        /* Remove browser autofill background */
        .idaa-auth-input input:-webkit-autofill,
        .idaa-auth-input input:-webkit-autofill:hover,
        .idaa-auth-input input:-webkit-autofill:focus {
            -webkit-text-fill-color: #102c4d;
            -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
            transition: background-color 5000s ease-in-out 0s;
        }


/* =========================
   PASSWORD EYE BUTTON
========================= */

.toggle-password {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #65758b;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.2s ease;
}

    .toggle-password:hover {
        background: #f5f6f8;
    }

    .toggle-password i {
        font-size: 18px;
    }


/* =========================
   REMEMBER ME
========================= */

.idaa-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 18px;
    font-size: 15px;
    color: #102c4d;
    cursor: pointer;
}

    .idaa-remember input {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        accent-color: #4664f5;
        cursor: pointer;
    }


/* =========================
   SIGNUP TERMS
========================= */

.idaa-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 6px 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #102c4d;
    cursor: pointer;
}

    .idaa-terms input {
        width: 18px;
        height: 18px;
        margin-top: 2px;
        flex-shrink: 0;
        accent-color: #4664f5;
        cursor: pointer;
    }


/* =========================
   MAIN SUBMIT BUTTON
========================= */

.idaa-auth-submit {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: #4664f5;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

    .idaa-auth-submit:hover {
        background: #3653e8;
    }

    .idaa-auth-submit:active {
        transform: translateY(1px);
    }

    .idaa-auth-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    .idaa-auth-submit i {
        font-size: 17px;
    }


/* =========================
   LINKS
========================= */

.idaa-auth-modal a {
    color: #4664f5;
    text-decoration: none;
    font-weight: 500;
}

    .idaa-auth-modal a:hover {
        text-decoration: underline;
    }


/* =========================
   FORGOT PASSWORD
========================= */

.idaa-forgot-password {
    text-align: center;
    margin: 20px 0;
}

    .idaa-forgot-password a {
        font-size: 15px;
    }


/* =========================
   OR DIVIDER
========================= */

.idaa-auth-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

    .idaa-auth-divider::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 1px;
        background: #dce1e8;
    }

    .idaa-auth-divider span {
        position: relative;
        display: inline-block;
        background: #ffffff;
        padding: 0 15px;
        color: #65758b;
        font-size: 14px;
        z-index: 1;
    }


/* =========================
   EMAIL OTP BUTTON
========================= */

.idaa-email-otp-btn {
    width: 100%;
    height: 56px;
    border: 1px solid #d9e0e8;
    border-radius: 14px;
    background: #ffffff;
    color: #102c4d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

    .idaa-email-otp-btn:hover {
        background: #f7f9fc;
        border-color: #cbd4df;
    }

    .idaa-email-otp-btn i {
        font-size: 18px;
    }


/* =========================
   FOOTER
========================= */

.idaa-auth-footer {
    margin-top: 20px;
    padding-top: 22px;
    border-top: 1px solid #dce1e8;
    text-align: center;
    color: #65758b;
    font-size: 15px;
}


/* =========================
   ERROR MESSAGE
========================= */

.idaa-auth-error {
    display: none;
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 15px;
    border: 1px solid #ffd4d4;
    border-radius: 10px;
    background: #fff4f4;
    color: #d93025;
    font-size: 14px;
}


/* =========================
   SUCCESS MESSAGE
========================= */

.idaa-auth-success {
    display: none;
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 15px;
    border: 1px solid #cdebd7;
    border-radius: 10px;
    background: #f2fbf5;
    color: #198754;
    font-size: 14px;
}


/* =========================
   VALIDATION
========================= */

.idaa-auth-input.has-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.08);
}

.idaa-auth-validation {
    margin-top: -9px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #dc3545;
}


/* =========================
   BODY LOCK
========================= */

body.auth-open {
    overflow: hidden;
}


/* =========================
   TABLET
========================= */

@media (max-width: 768px) {

    .idaa-auth-modal {
        padding: 16px;
    }

    .idaa-auth-modal-content {
        max-width: 470px;
        padding: 30px;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 576px) {

    .idaa-auth-modal {
        align-items: center;
        padding: 12px;
    }

    .idaa-auth-modal-content {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 18px;
    }

    .idaa-auth-header {
        gap: 12px;
        margin-bottom: 22px;
    }

        .idaa-auth-header h2 {
            font-size: 24px;
        }

        .idaa-auth-header p {
            font-size: 14px;
        }

    .auth-close {
        padding: 7px 10px;
        font-size: 13px;
    }

    .idaa-auth-input {
        height: 54px;
        border-radius: 12px;
        padding: 0 14px;
    }

        .idaa-auth-input input {
            font-size: 15px;
        }

    .idaa-auth-submit {
        height: 54px;
        border-radius: 12px;
    }

    .idaa-email-otp-btn {
        height: 54px;
        border-radius: 12px;
        font-size: 15px;
    }

    .idaa-auth-footer {
        font-size: 14px;
    }
}


/* =========================
   VERY SMALL MOBILE
========================= */

@media (max-width: 380px) {

    .idaa-auth-modal-content {
        padding: 20px 16px;
    }

    .idaa-auth-header h2 {
        font-size: 22px;
    }

    .auth-close {
        padding: 6px 8px;
    }

    .idaa-auth-input {
        padding: 0 12px;
    }
}
