/* =========================================================
   POPUP LOGIN - PERPUSTAKAAN DIGITAL
   Khusus Login
========================================================= */


/* =========================================================
   MODAL BACKGROUND
========================================================= */

.login-modal {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 99999;

    display: none;

    justify-content: center;
    align-items: center;

    padding: 16px;

    box-sizing: border-box;

    background: rgba(120, 40, 0, 0.35);
}


/* Saat popup dibuka */

.login-modal.show {
    display: flex;
}


/* =========================================================
   LOGIN POPUP
========================================================= */

.login-popup {

    width: 448px;
    height: 516px;

    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);

    position: relative;

    background:
        linear-gradient(
            145deg,
            #FFF7ED 0%,
            #FFFFFF 100%
        );

    border-radius: 24px;

    overflow: hidden;

    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25);

    box-sizing: border-box;

    animation:
        loginPopupShow
        0.25s
        ease;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes loginPopupShow {

    from {

        opacity: 0;

        transform:
            scale(0.95)
            translateY(10px);
    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);
    }
}


/* =========================================================
   HEADER LOGIN
========================================================= */

.login-popup-header {

    width: 448px;
    height: 188px;

    position: relative;

    overflow: hidden;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            #F97316 0%,
            #FB923C 50%,
            #FDBA74 100%
        );

    color: white;
}


/* =========================================================
   HEADER DECORATION
========================================================= */

.login-popup-header::before {

    content: "";

    position: absolute;

    width: 128px;
    height: 128px;

    right: -38px;
    top: -38px;

    background:
        rgba(255, 255, 255, 0.10);

    border-radius: 50%;
}


.login-popup-header::after {

    content: "";

    position: absolute;

    width: 96px;
    height: 96px;

    left: -29px;
    bottom: -29px;

    background:
        rgba(255, 255, 255, 0.08);

    border-radius: 50%;
}


/* =========================================================
   HEADER CONTENT
========================================================= */

.login-header-inner {

    width: 384px;

    position: absolute;

    left: 32px;
    top: 32px;

    display: flex;

    flex-direction: column;

    align-items: center;

    box-sizing: border-box;
}


/* =========================================================
   LOGIN ICON BOX
========================================================= */

.login-icon {

    width: 64px;
    height: 64px;

    margin-bottom: 12px;

    display: flex;

    justify-content: center;
    align-items: center;

    position: relative;

    z-index: 2;

    background:
        rgba(255, 255, 255, 0.22);

    border-radius: 16px;

    box-shadow:
        0 4px 6px -4px rgba(0, 0, 0, 0.10),
        0 10px 15px -3px rgba(0, 0, 0, 0.10);

    font-size: 32px;

    line-height: 32px;
}


/* =========================================================
   LOGIN TITLE
========================================================= */

.login-popup-header h2 {

    margin: 0;

    position: relative;

    z-index: 2;

    color: white;

    text-align: center;

    font-family:
        "Poppins",
        sans-serif;

    font-size: 24px;

    font-weight: 400;

    line-height: 32px;
}


/* =========================================================
   LOGIN SUBTITLE
========================================================= */

.login-popup-header p {

    width: 384px;

    margin: 4px 0 0;

    position: relative;

    z-index: 2;

    color: #FFEDD4;

    text-align: center;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 14px;

    font-weight: 400;

    line-height: 20px;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.login-close {

    position: absolute;

    top: 16px;
    right: 16px;

    width: 32px;
    height: 32px;

    z-index: 20;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: transparent;

    color: white;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 18px;

    font-weight: 400;

    line-height: 28px;

    display: flex;

    justify-content: center;
    align-items: center;

    cursor: pointer;

    transition:
        background 0.2s ease;
}


.login-close:hover {

    background:
        rgba(255, 255, 255, 0.18);
}


/* =========================================================
   LOGIN BODY
========================================================= */

.login-popup-body {

    width: 448px;

    padding:
        24px
        32px;

    box-sizing: border-box;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 16px;
}


/* =========================================================
   LOGIN FIELD
========================================================= */

.login-field {

    width: 384px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 4px;
}


/* =========================================================
   LABEL
========================================================= */

.login-field label {

    width: 100%;

    margin: 0;

    color: #CA3500;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 14px;

    font-weight: 400;

    line-height: 20px;
}


/* =========================================================
   INPUT WRAPPER
========================================================= */

.login-input-wrap {

    width: 384px;
    height: 44px;

    position: relative;

    box-sizing: border-box;
}


/* =========================================================
   INPUT
========================================================= */

.login-input {

    width: 384px;
    height: 44px;

    display: block;

    box-sizing: border-box;

    padding:
        10px
        40px;

    background: #FFF7ED;

    border:
        2px solid
        #FED7AA;

    border-radius: 12px;

    outline: none;

    color: #7C2D12;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 14px;

    font-weight: 400;

    line-height: 20px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   PLACEHOLDER
========================================================= */

.login-input::placeholder {

    color: #FFB86A;

    opacity: 1;
}


/* =========================================================
   INPUT FOCUS
========================================================= */

.login-input:focus {

    border-color: #F97316;

    box-shadow:
        0 0 0 3px
        rgba(249, 115, 22, 0.12);
}


/* =========================================================
   INPUT ICON
========================================================= */

.login-input-icon {

    position: absolute;

    left: 12px;
    top: 12px;

    width: 20px;
    height: 20px;

    z-index: 3;

    display: flex;

    justify-content: center;
    align-items: center;

    color: #FFB86A;

    font-size: 16px;

    pointer-events: none;
}


/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.login-password-toggle {

    position: absolute;

    right: 8px;
    top: 8px;

    width: 28px;
    height: 28px;

    padding: 0;

    border: none;

    background: transparent;

    color: #FFB86A;

    font-size: 15px;

    display: flex;

    justify-content: center;
    align-items: center;

    cursor: pointer;

    z-index: 5;
}


.login-password-toggle:hover {

    color: #F97316;
}


/* =========================================================
   LUPA PASSWORD
========================================================= */

.login-forgot {

    width: 384px;

    display: flex;

    justify-content: flex-end;

    align-items: flex-start;

    margin-top: -1px;
}


.login-forgot a {

    color: #FF6900;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 12px;

    font-weight: 400;

    line-height: 16px;

    text-decoration: none;

    cursor: pointer;
}


.login-forgot a:hover {

    text-decoration: underline;
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-submit {

    width: 384px;
    height: 44px;

    padding:
        12px
        20px;

    box-sizing: border-box;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            90deg,
            #F97316 0%,
            #FB923C 25%,
            #FDBA74 50%,
            #FB923C 75%,
            #F97316 100%
        );

    box-shadow:
        0 4px 6px -4px
        rgba(0, 0, 0, 0.10),

        0 10px 15px -3px
        rgba(0, 0, 0, 0.10);

    color: white;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 14px;

    font-weight: 400;

    line-height: 20px;

    text-align: center;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}


.login-submit:hover {

    transform:
        translateY(-1px);

    filter:
        brightness(1.05);
}


.login-submit:active {

    transform:
        translateY(0);
}


/* =========================================================
   REGISTER LINK
========================================================= */

.login-register-link {

    width: 384px;
    height: 20px;

    display: flex;

    justify-content: center;
    align-items: center;

    color: #FF8904;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 14px;

    font-weight: 400;

    line-height: 20px;

    text-align: center;
}


.login-register-link a {

    margin-left: 4px;

    color: #F54900;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 14px;

    font-weight: 600;

    line-height: 20px;

    text-decoration: underline;

    cursor: pointer;
}


/* =========================================================
   ERROR
========================================================= */

.login-error {

    width: 384px;

    padding:
        8px
        12px;

    box-sizing: border-box;

    border:
        1px solid
        #FCA5A5;

    border-radius: 10px;

    background: #FEF2F2;

    color: #B91C1C;

    font-family:
        "Nunito",
        sans-serif;

    font-size: 13px;

    line-height: 18px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 520px) {

    .login-modal {

        padding: 12px;
    }


    .login-popup {

        width: 100%;

        max-width: 448px;

        height: auto;

        min-height: 516px;
    }


    .login-popup-header {

        width: 100%;

        height: 188px;
    }


    .login-header-inner {

        width: calc(100% - 40px);

        left: 20px;
    }


    .login-popup-header p {

        width: 100%;
    }


    .login-popup-body {

        width: 100%;

        padding:
            24px
            20px;
    }


    .login-field,
    .login-input-wrap,
    .login-input,
    .login-forgot,
    .login-submit,
    .login-register-link,
    .login-error {

        width: 100%;
    }
}