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

@font-face {
    font-family: "Karla",sans-serif;
    src: url(./assets/fonts/Karla-VariableFont_wght.ttf);
}


:root {
    /* Colors */

/* primary colors */
--Green-200: hsl(148, 38%, 91%);
--Green-600: hsl(169, 82%, 27%);
--Red: hsl(0, 66%, 54%);

 /* Neutral */

--White: hsl(0, 0%, 100%);
--Grey-500: hsl(186, 15%, 59%);
--Grey-900: hsl(187, 24%, 22%);


}




html {  
    font-family: "Karla",sans-serif;  
}
body {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--Green-200);
}
label,p.query {
    font-size: 1rem;
    font-weight: 700;
    color: var(--Grey-900);
}

.container {
    position: relative;
    background-color: var(--White);
    padding: 25px;
    border-radius: 10px;
    width: 640px;
}
.container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--Grey-900);
}
/* Form style */
.form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    
}
.inp-group{
    width: 100%;
    display: flex;
    gap: 10px;
} 
.inp-group .inp-field{
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 7px;

}
.inp-group.query-type {
    display: flex;
    flex-direction: column;
}
.inp-group.query-type .options {
    display: flex;
    flex-direction: row;
    gap: 10px;
}
.inp-group.query-type .options .inp-field  {
    width: 50%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 10px;
}
.options .inp-field input[type='radio'] {
    appearance: none;
    outline: 1px solid var(--Grey-500);
    outline-offset: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    cursor: pointer;
}
.inp-field:has(input[type='radio']:checked){

    background-color: var(--Green-200);
}
.options .inp-field label {
    cursor: pointer;
}
.options .inp-field input[type='radio']:checked {
    outline: 2px solid var(--Green-600);
    background-color: var(--Green-600);
}



.inp-field input[type='text'],
.inp-field input[type='email'],
.inp-group.query-type .options .inp-field,
.inp-field textarea {
    outline: none;
    border: 1px solid var(--Grey-500);
    width: 100%;
    height: 35px;
    border-radius: 4px;
    padding-left: 20px ;
}
/* style required input */
.inp-field .info.required{
    
    border: 1px solid var(--Red);

}
.inp-group.aprroval {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.inp-group .aprroval {
    display: flex;
    align-items: center;
    gap: 10px;
}
.inp-field textarea {
    height: 90px;
    resize: none;
    padding: 10px;
}
 input[type='checkbox'] {
    accent-color: var(--Green-600);
    cursor: pointer;
}
.inp-field.message {
    position: relative;
}
.count {
    position: absolute;
    bottom: 0;
    right: 10px;
    font-size: 15px;
    color: var(--Grey-900);
}
.count.valid {
    color: var(--Green-600);
}
.count.not-valid {
    color: var(--Red);
}
.submit-btn {
    width: 100%;
    height: 40px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    text-transform: uppercase;
    color: var(--White);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    background-color: var(--Green-600);
    transition: .3s ease;
}label:last-child {
    padding-block: 5px;
}
.err-msg {
    display: none;
    font-size: 13px;
    font-style: italic;
    color: var(--Red);
    transform: translateY(-5px);
}
.err-msg.active {
    display: block;
}






.container .success {
    position: absolute;
    top: -15%;
    left: 50%;
    width: 360px;
    height: auto;
    padding: 20px;
    transform: translate(-50% , -300%) scale(0);
    background-color: var(--Grey-900);
    border-radius: 10px;
    transition: all 0.4s ease-in-out;
    z-index: 99;
    /* display: none; */
}
.container .success.done {
    transform: translate(-50% , -10%) scale(1);
    
    
}


.success .message-sent {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.message-sent img {
    width: 20px;
}
.message-sent p {
    font-size: 14px;
    font-weight: 400;
    color: var(--White);
}

.success .thanks {
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    color: var(--Grey-500);
}






/* Hover State */
.inp-field:hover input,.options .inp-field {
    cursor: pointer;
}
.submit-btn:hover {
    background-color: hsl(171, 83%, 14%);
}

/* media */

@media screen and (max-width:768px) {
    .container {
        width: 100%;
        margin-block: 2.5rem;
    }

    .inp-group.name,
    .inp-group.query-type .options{
        width: 100%;
        flex-direction: column;
        margin: auto;
    } 
    .inp-field textarea {
        height: 220px;
    }
    .container .success {
        top: -10%;
        left: 0;
        transform: translate(0 , -200%) scale(0);
        width: 100%;
    }
    .container .success span,
    .container .success p {
        font-size: 18px;
    }
    .container .success.done {
        transform: translate(0 , 100%) scale(1);
        
        
    }
    
  
   
    
    
    
    
    
    
    
    
    

    
}
/* footer */
footer {
    position: absolute;
    width: 100%;
    bottom: 10px;
}
.attribution {
    color: #232324;
    font-size: 13px;
    text-align: center;
}

.attribution a {
    color: #09035c;;
}