@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

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


:root {
    --blue-800:hsl(234, 29%, 20%);
    --blue-700:hsl(235, 18%, 26%);
    --grey:hsl(0, 0%,58%);
    --white: hsl(0, 0%, 100%);
    --red: hsl(4, 100%, 67%);
    --roboto-font-family : "Roboto", sans-serif;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--blue-700);
    
}

.newsletter-container {
    position: relative;
    height: 520px;
    width: 800px;
    display: flex;
    font-family: var(--roboto-font-family);
    align-items: center;
    justify-content: center;
    padding: 32px;
    border-radius: 32px;
    background-color: var(--white);
}


.side {
    width: 50%;
    height: 100%;
}


/* State On-Off */
    .active {
        display: flex;
    }

    .hidden {
        display: none;
    }


/* For Success Screen */

.newsletter-container-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 42px;
    padding: 12px;
}

.newsletter-info-board-title h2 {
    font-size: 42px;
    color: var(--blue-800);
    font-weight: bold;
}

.newsletter-info-board-title {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.newsletter-info-board-title p {
    font-size: 13px;
    color: var(--blue-700);
    font-weight: 400;
}

.feature-item-lists {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list-item p {
    font-weight: 500;
}

.newsletter-container-right {
    background-image: url("/assets/images/illustration-sign-up-desktop.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
}

.newsletter-email-form {
    display: flex;
    flex-direction: column;
    margin-top: 14px;
    gap: 12px;

}

.form-email-input {
    padding: 15px;
    border-radius: 8px;
    outline: none;
    border: 1.3px solid var(--grey);
    font-weight: 600;
    cursor: pointer;
}

.form-email-input.input-error {
    background-color: rgb(241, 213, 213);
    color: var(--red);
    border: 1.3px solid var(--red);
}

#email-send-btn {
    text-decoration: none;
    padding: 18px;
    background-color: var(--blue-800);
    font-size: 12.5px;
    color: var(--white);
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    transition: background 0.4s ease;
    cursor: pointer;
}

#email-send-btn:hover {
    background: linear-gradient(90deg, rgba(255,85,121,1) 8%, rgba(254,104,64,1) 100%);

}




.form-title-field {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    font-family: var(--roboto-font-family);
    font-size: 11.2px;
    font-weight: 500;

}

.error-label {
    color: var(--red);
    display: none;
}


/* Success Screen */

.newsletter-success {
    width: 420px;
    padding: 52px;
    height: 420px;
    background-color: var(--white);
    border-radius: 26px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
}
#close-msg-btn {
    align-self: center;
    text-decoration: none;
    padding: 16.5px;
    background-color: var(--blue-800);
    width: 100%;
    text-align: center;
    color: var(--white);
    font-family: var(--roboto-font-family);
    font-size: 15px;
    border-radius: 14px;
    transition: background 0.4s ease;
}

#close-msg-btn:hover {
    background: linear-gradient(90deg, rgba(255,85,121,1) 8%, rgba(254,104,64,1) 100%);

}

.message-contents {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}
.message-title h1{
    font-family: var(--roboto-font-family);
    font-size: 42.5px;
    font-weight: 900;
    color: var(--blue-800);
}

.message-description p{
    font-family: var(--roboto-font-family);
    color: var(--blue-700);
    font-size: 13.5px;
    font-weight: 400;
}

#subs-email {
    font-weight: 800;
    text-decoration: none;
    color: var(--blue-800);
}


@media screen and (max-width: 768px) {
    .newsletter-container {
        width: 100%;
        height: 100%;
        flex-direction: column-reverse;
        border-radius: 0;
        padding: 0;
    }

    .newsletter-container-right {
        border-radius: 0;
        border-bottom-right-radius: 18px;
        border-bottom-left-radius: 18px;
        height: 60%;
    }

    .newsletter-container-left {
        padding: 14px;
    }

    .side {
        width: 100%;
    }

    /* Success Screen */

    .newsletter-success {
        height: 100%;
        width: 100%;
        border-radius: 0;
        justify-content: center;
        align-items: flex-start;
        gap: 10rem;
    }

    .newsletter-content {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
    }

    .message-description p  {
        font-size: 13.0px;
        text-align: left;
        
    }
    .message-title h1{
        font-size: 38.5px;
    }
}
