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

body {
    font-family: "Karla", sans-serif;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background-color: hsl(148, 38%, 91%);
}

h1 {
    font-size: clamp(1rem, 2.5vw, 2rem);
}

form {
    width: 327px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background-color: white;

    fieldset {
        border: none;
    }

    .error-message {
        color: red
    }
    
    input[type="text"], input[type="email"], input[type="radio"] {
        height: 50px;
        border-radius: 10px;
        border-width: 1px;
        padding: 0 1rem 0 1rem;
    }

    input[type="text"]:focus, input[type="email"]:focus {
        outline: none;
        border-style: solid;
        border-color: hsl(169, 82%, 27%);
        border-width: 2px;
    } 

    input[type="radio"]:checked, input[type="checkbox"]:checked {
        accent-color: hsl(169, 82%, 27%);
    }

    .input-section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        border: none;
        margin: 1rem 0 1rem 0;
    }

    .query-section {
        display: flex;
        gap: 1rem;
        align-items: center;
        padding: 0 1rem 0 1rem;
        margin: 1rem 0 1rem 0;
        border-style: solid;
        border-width: 1px;
        border-radius: 10px;
    }

    textarea {
        padding: 1rem;
        border-radius: 10px;
        resize: none;
    }

    textarea:focus {
        outline: none;
        border-style: solid;
        border-color: green;
        border-width: 2px;
    }

    .consent-container {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    button {
        color: white;
        font-size: large;
        height: 50px;
        border-radius: 10px;
        border: none;
        background-color: hsl(169, 82%, 27%);
    }
}

dialog {
    color: rgb(172, 172, 172);
    position: absolute;
    top: 4rem;
    left: 0rem;
    right: 0rem;
    margin: auto;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    background-color: hsl(187, 24%, 22%);

    .dialog-container {
        color: white;
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

.dialog-shown {
    display: block;
}

@media (min-width: 90rem) {
    form {
        width: 500px;

        .name-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }
        .query-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }
        input:hover {
            cursor: pointer;
        }
        button:hover {
            cursor: pointer;
        }

        textarea {
            height: 100px;
        }
    }
}