@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap');

*, *::before, *::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body, input {
    font-family: "Poppins", sans-serif;
}

main{
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
    background-color: #a4c4b5;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box {
    position: relative;
    width: 100%;
    max-width: 1020px;
    height: 640px;
    background-color: #fff;
    border-radius: 2rem;
    box-shadow: 0 60px 40px -30px rgba(0, 0, 0, 0.27);
}

.inner-box {
    position: absolute;
    width: calc(100% - 4.1rem);
    height: calc(100% - 4.1rem);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forms-wrap{
    position: absolute;
    height: 100%;
    width: 45%;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    transition: 0.8s ease-in-out;
}

form {
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

form.sign-up-form{
    opacity: 0;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 45px;
    margin: 0.3rem;
}

.logo h4 {
    font-size: 1.1rem;
    border-top: -9px;
    letter-spacing: -0.5px;
    color: #151111;
}

.heading h2{
    font-size: 2.1rem;
    font-weight: 600;
    color: #151111;
}

.heading h6 {
    color: #bababa;
    font-weight: 400;
    font-size: 0.75rem;
    display: inline;
}

.toggle {
    color: #151111;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.3s;
}

.error {
    background-color: #ffdddf;
    padding: 0.2rem 0.4rem;
    border: solid #fea6ad 0.15rem;
    border-radius: 0.2rem;
    display: none;
}

.error.active {
    display: block;
}

.error p {
    font-size:  0.7rem;
    font-weight: 500;
}

.success {
    background-color: #e0ffdd;
    padding: 0.2rem 0.4rem;
    border: solid #bafab1 0.15rem;
    border-radius: 0.2rem;
    display: none;
}

.success.active {
    display: block;
}

.success p {
    font-size:  0.7rem;
    font-weight: 500;
}

.toggle:hover{
    color:  #bcd1c7;
}

.input-wrap{
    position: relative;
    height:37px;
    margin-bottom: 2rem;
}

.input-field{
    position: absolute;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    outline: none;
    border-bottom: 1px solid #bbb;
    transition: 0.4s;
}

label {
    position:absolute;
    left: 0;
    top:50%;
    transform: translateY(-50%);
    padding: 0;
    font-size: 0.95rem;
    color: #bbb;
    pointer-events: none;
    transition: 0.4s;
}

.empty {
    color:#fff;
  }  

input[type="data"] {
    transition: 0.8s;
}

input[type="date"]:focus {
    color:#151111
}

.input-field.active {
    border-bottom-color: #151111;
}

.input-field.active + label {
    font-size: 0.5rem;
    top:-2px;
}

.sign-btn {
    display: inline-block;
    width: 100%;
    height: 43px;
    background-color: #151111;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 0.8rem;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    transition: 0.3s;
}

.sign-btn:hover {
    background-color: #bcd1c7;
}

.text{
    color: #bbb;
    font-size: 0.7rem;
}

.text a{
    color: #bbb;
    transition: 0.3s;

}

.text a:hover {
    color:#bcd1c7
}

main.sign-up-mode form.sign-in-form {
    opacity: 0;
    pointer-events: none;
}

main.sign-up-mode form.sign-up-form {
    opacity: 1;
    pointer-events: all;
}


main.sign-up-mode .forms-wrap {
    left: 55%;
}

main.sign-up-mode .carousel {
    left: 0;
}

.carousel {
    position: absolute;
    height: 100%;
    width: 55%;
    top: 0;
    left: 45%;
    background-color: #F7D1C4;
    border-radius: 1rem;
    display: grid;
    grid-template-rows: auto 1fr;
    transition: 0.8s ease-in-out;
}

.images-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 1rem; 
}

.image{
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    grid-column: 1/2;
    grid-row: 1/2;
    opacity: 0;
    transition: opacity 0.3s, transform 0.5s;
    transform: scale(0.4, 0.5);
}


.image.show {
    opacity: 1;
    transform: none;
}

.text-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    
}

.text-wrap {
    max-height: 2.2rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.text-group {
    display: flex;
    flex-direction: column;
    text-align: center;
    transform: translateY(0);
}

.text-group h2 {
    line-height: 2.2rem;
    font-size: 1.2rem;
}

.bullets {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bullets span {
    display:block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #aaa;
    margin: 0 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}

.bullets span.active {
    width: 1.1rem;
    background-color: #151111;
    border-radius: 1rem;
}


#topbar {
    position: sticky;
    height: 60px;
    width: 100%;
}

@media (max-width: 1050px) {
    main {
        padding: 1rem;
    }

    .box{
        -ms-overflow-style: none; /* for Internet Explorer, Edge */
        scrollbar-width: none; /* for Firefox */
        min-height: 80vh;
        max-height: calc(100dvh - 2rem);
        overflow-y: scroll;
        border-radius: 2rem;
    }
    .text-group h2 {
        font-size: 1rem;
    }
    
}

@media (max-width: 850px) {
    main {
        padding: 1rem;
    }

    .box{
        -ms-overflow-style: none; /* for Internet Explorer, Edge */
        scrollbar-width: none; /* for Firefox */
        max-height: calc(100dvh - 2rem);
        overflow-y: scroll;
        border-radius: 2rem;
    }

    .inner-box {
        position: static;
        transform: none;
        width: revert;
        height: revert;
        padding: 2rem;
    }

    .forms-wrap {
        position: revert;
        width: 100%;
        height: auto;
    }

    form {
        max-width: revert;
        padding: 1.5rem 2.5rem 2rem;
        transition: transform 0.8s ease-in-out, opacity 0.45s linear;
    }

    .heading {
        margin: 2rem 0;
    }

    form.sign-up-form{
        transform: translateX(-100%);
    }

    main.sign-up-mode form.sign-in-form {
        transform: translateX(-100%);
    }

    main.sign-up-mode form.sign-up-form {
        transform: translateX(0%);
    }

    .carousel {
        position: revert;
        height: auto;
        width:100%;
        padding: 3rem 2rem;
        display: flex;
    }

    .images-wrapper {
        display: none;
    }

    .text-slider {
        width: 100%
    }

}

@media (max-width: 530px) {
    main {
        padding: 1rem;
    }

    .box{
        -ms-overflow-style: none; /* for Internet Explorer, Edge */
        scrollbar-width: none; /* for Firefox */
        max-height: calc(100dvh - 2rem);
        overflow-y: scroll;
        border-radius: 2rem;
    }

    .box::-webkit-scrollbar {
        display: none; /* for Chrome, Safari, and Opera */
      }

    .inner-box {
        padding: 1rem;
    }

    .carousel {
        display:none
    }

    .text-wrap {
        margin-bottom: 1rem;
    }

    .text-group h2 {
        font-size: 1.2rem;
    }

    form {
        padding: 1rem 2rem 1.5rem;
    }
}