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


:root{
    /* primary color */
    --greenLight: hsl(148, 38%, 91%);
    --greenMedium: hsl(169, 82%, 27%);
    --red: hsl(0, 66%, 54%);
    /* Neutral */
    --white: hsl(0, 0%, 100%);
    --GreyMedium: hsl(186, 15%, 59%);
    --GreyDarker: hsl(187, 24%, 22%);
     --darkerGreen: hsl(190, 21%, 17%);

    /* font style */
    --pageFont: 1rem;
    --labelFont: 0.9rem;
    --pageFamily: "Karla", sans-serif;

    /* design size */
    --mobile: 375px;
    --desktop: 100vw;
}

body{
    background-color: var(--greenLight);
    font-family: var(--pageFamily);
    font-size: var(--pageFont);
}

.container{
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    position: relative;
    perspective: 800px;
}


/* form styling */
.form{
    width: 500px;
    background-color: var(--white);
    height: auto;
    padding:1.5rem;
    border: none;
    border-radius: 0.7rem;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
}

.form h1{
    color: var(--GreyDarker);
}

.input-container{
    width: 100%;
    height: 100%;
    padding: 0.3rem  0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    /* border: 2px solid red; */
}

.name-container{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* label */
label{
    font-size: var(--labelFont);
    color: var(--GreyDarker);
    font-weight: 600;
}

/* input text style  */
.names,.email{
    width: 100%;
    padding: 0.4rem;
    font-size: var(--pageFont);
    color: var(--GreyDarker);
    font-weight: 600;
    border-radius: 0.4rem;
    outline: none;  
    border: 2px solid var(--GreyDarker);
    transition: 0.8ms ease-in;
}
.names:focus,
.email:focus{
    border: 3px solid var(--greenMedium);
}



/* email  and query section */
.email-container,.query{
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

/* query container */
.query-container{
    width: 100;
}

/* query container */
.query-container{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.2rem;
}

.query-box-btn,
    .text-area{
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border: 1.5px solid var(--greenMedium);
    padding: 0.4rem;
    font-size: var(--pageFont);
    color: var(--GreyDarker);
    font-weight: 600;
    border-radius: 0.4rem;
    outline: none;  
    cursor: pointer;
}
.changeColor{
    background-color: var(--greenLight);
}

.query-box-btn label{
    font-size: var(--pageFont);
}

/* text area */
.text-area{
    border: none;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
}

.text-area textarea{
    width: 100%;
    height: 60px;
    padding: 0.8rem;
}

/* consent */
.consent{
    width: 100%;
    padding: 0.3rem 0px;
    display: flex;
    flex-direction: column;
}

/* submit button */
.submit-btn{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.submit{
    width: 100%;
    height: 40px;
    background-color: var(--greenMedium);
    color: var(--white);
    border: none;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.8ms ease-in;
}

.submit:active{
    transform: translateY(3px);
    background-color: var(--darkerGreen);
}

.names:hover,
.email:hover,
textarea:hover,
.query-box-btn:hover{
    border: 2px solid var(--greenLight) ;
    transition: border 0.7ms ease-in-out;
}

/* error messages */
.error{
    color: var(--red);
}

.success{
    width: 400px;
    background-color: var(--darkerGreen);
    color: var(--white);
    padding: 1rem;
    border-radius: 0.7rem;

    display: flex;
    flex-direction: column;
    gap: 1rem;

    position: absolute;
    top: 50px;
    left: 50%;
    transform: translate(-50%, -50%);   

    animation: popMoved 0.6s ease-in-out both;
}

@keyframes popMoved {
    from{
        transform: translateZ(-20%) scale(0.3);
        opacity: 0.1;
    }
    to{
        transform: translateZ(100%) scale(1);
        opacity: 1;
    }
    
}

.success span{
    display: flex;
    align-items: center;
    margin-left: 0.7rem;
}

.success p {
    font-size: 0.8rem;
    color: #f1f1f1;
    font-weight: 200;
    text-align: center;
}

.submit-btn a{
    list-style: none;
    color: inherit;
}

/* media at mobile size */

@media (max-width: 480px) {
    .container{
        width: 100%;
        height: 100%;
        padding: 2rem;
    }

    .form{
        width: 90%;
        height: 100%;
        padding:2.5rem 2rem;
        gap: 0.5rem ;
    }

    .input-container{
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.2rem;
    }

    .names,.email{
        padding: 0.3rem;
        font-size: 0.9rem;
        font-weight: 500;
    }

    /* query */
    .query-container{
        flex-direction: column ;
        gap: 1rem;
    }

    /* text area */
    .text-area textarea{
        width: 100%;
        height: 120px;
    }

    .success{
        width: 80%;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    .success span{
        gap: 0.6rem;
        margin-left: 0.7rem;
    }

}

