/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400..800&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
    /* Tema Modern Merah dan Putih */
    --first-color: hsl(350, 80%, 50%);
    --first-color-alt: hsl(350, 80%, 40%);
    --border-color: hsl(0, 0%, 85%);
    --title-color: hsl(0, 0%, 15%);
    --text-color: hsl(0, 0%, 45%);
    --body-color: hsl(0, 0%, 98%);
    --container-color: hsl(0, 0%, 100%);

    /* Typography */
    --body-font: "Syne", sans-serif;
    --big-font-size: 1.5rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
}

/* Responsive typography */
@media screen and (width >=1150px) {
    :root {
        --big-font-size: 2.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body,
input,
button {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    font-weight: 600;
}

input,
button {
    border: none;
    outline: none;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/*=============== LOGIN ===============*/
.login {
    height: 100vh;
    display: grid;
    align-items: center;
    margin-inline: 1rem;
}

.login__img {
    display: none;
}

.login__content {
    box-shadow: 0 10px 40px hsla(350, 80%, 50%, 0.08);
    height: 90%;
    padding: 3.5rem 1.5rem;
    border-radius: 1.5rem;
    background-color: var(--container-color);

    /* Setup relatif & flex untuk menahan layout form dan logo awal */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.img__loading {
    position: absolute;
    width: 100%;
    /* Fixed size agar tidak gepeng */
    height: 100%;
    /* Fixed size agar tidak gepeng */
    /* object-fit: contain; */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.login__form-wrapper {
    width: 100%;
    /* Memastikan form mengambil lebar penuh dari kontainer setelah animasi */
}

.login__title {
    font-size: var(--big-font-size);
    color: var(--title-color);
    text-align: center;
    margin-bottom: 3rem;
}

.login__group {
    display: grid;
    row-gap: 1rem;
    margin-bottom: 1rem;
}

.login__box {
    position: relative;
    height: 64px;
    background-color: var(--container-color);
    border: 2px solid var(--border-color);
    border-radius: 4rem;
    display: flex;
    align-items: center;
    transition: border-color .3s;
}

.login__box:focus-within {
    border-color: var(--first-color);
}

.login__icon {
    position: absolute;
    left: 1.25rem;
    font-size: 1.5rem;
    font-weight: initial;
    color: var(--first-color);
}

.login__label {
    position: absolute;
    left: 3.25rem;
    transition: opacity .4s;
    color: var(--text-color);
}

.login__input {
    width: 100%;
    height: 100%;
    margin-left: 3.25rem;
    font-weight: 600;
    z-index: 2;
    background: transparent;
    color: var(--title-color);
}

.login__input:focus+.login__label,
.login__input:not(:placeholder-shown)+.login__label {
    opacity: 0;
}

.login__input:autofill {
    transition: background-color 6000s, color 6000s;
}

.login__button {
    width: 100%;
    height: 64px;
    background-color: var(--first-color);
    color: #ffffff;
    border-radius: 4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: .5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color .4s, box-shadow .4s;
}

.login__button:hover {
    background-color: var(--first-color-alt);
    box-shadow: 0 8px 24px hsla(350, 80%, 50%, 0.3);
}

.login__button i {
    font-weight: initial;
    font-size: 1.5rem;
}

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media (width >=540px) {
    .login {
        grid-template-columns: 400px;
        justify-content: center;
    }
}

/* For large devices */
@media (width >=1150px) {
    .login {
        grid-template-columns: initial;
    }

    .login__image {
        overflow: hidden;
        height: 400px;
        display: flex;
        justify-content: center;
        border-radius: 3rem;
        align-items: center;
    }

    .login__img {
        display: block;
        width: 350px;
        border-radius: 3rem;
    }

    .login__content {
        display: grid;
        grid-template-columns: 360px 480px;
        column-gap: 7rem;
        align-items: center;
        padding: 1.5rem 1.5rem 1.5rem 7rem;
        border-radius: 4rem;
        overflow: hidden;
    }
}