@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,700;0,800;1,400;1,700;1,800&display=swap');
*{
    padding: 0;
    margin: 0;
  }

:root {
    --purple-500: hsl(259, 100%, 65%);
    --red-400: hsl(0, 100%, 67%);
    --white: hsl(0, 100%, 100%);
    --grey-100: hsl(0, 0%, 94%);
    --grey-200: hsl(0, 0%, 86%);
    --grey-500: hsl(0, 1%, 44%);
    --black: hsl(0, 0%, 0%);
    --font-family: "Poppins", sans-serif;
    --style-thin: 400;
    --style-normal: 700;
    --style-bold: 800;
    --size-small: 14px;
    --size-regular: 32px;
    --size-big: 60px;
    --spacer-big: 50px;
    --spacer-medium: 15px;
}

body {
    display: grid;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-family);
    font-weight: var(--style-thin);
    font-style: italic;
    font-size: var(--size-regular);
    color: var(--black);
    background-color: var(--grey-200);
}

main {
    width: 20em;
    background-color: var(--white);
    border-radius: var(--spacer-medium);
    border-bottom-right-radius: 150px;
    padding: var(--spacer-big);
    margin: auto;
    margin-top: var(--spacer-big);
    margin-bottom: var(--spacer-big);
}

.form-container fieldset {
    display: flex;
    gap: 2.7em;
    border: 0;
}

.day-field, .month-field, .year-field {
    display: flex;
    flex-direction: column;
    font-size: var(--size-small);
    font-weight: var(--style-regular);
    font-style: normal;
    text-transform: uppercase;
    width: 7em;
}

.form-container label {
    color: var(--grey-500);
    font-weight: var(--style-normal);
    letter-spacing: 0.5em;
    margin-bottom: var(--spacer-medium);
}

.form-container input[type="text"] {
    height: var(--spacer-big);
    border: solid 1px var(--grey-200);
    border-radius: var(--spacer-medium);
    color: var(--black);
    font-family: var(--font-family);
    font-size: var(--size-regular);
    font-weight: var(--style-bold);
    padding: var(--spacer-medium);
    width: 4em;
}

.form-container input[type="text"]:hover, .form-container input[type="text"]:focus {
    border-color: var(--purple-500);
    cursor: pointer;
}

.error-msg {
    width: 200%;
    color: var(--red-400);
    font-size: var(--size-small);
    font-weight: var(--style-thin);
    font-style: italic;
    text-transform: none;
}

.submit-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
}

hr {
    height: 1px;
    border: none;
    background-color: var(--grey-200);
}

.hr1 {
    width: 90%;
}

.hr2 {
    width: 0;
}

.submit {
    width: 6em;
    height: 6em;
    border-style: none;
    border-radius: 50%;
    background-color: var(--purple-500);
    background-image: url("./assets/images/icon-arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

.submit:hover {
    background-color: var(--black);
    cursor: pointer;
}

.submit:focus {
    border: solid 1px var(--black);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

.results-container {
    font-size: var(--size-big);
    font-weight: var(--style-bold);
}

span.results {
    color: var(--purple-500);
}

.attribution {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 10vh;
    font-size: var(--size-small);
    color: var(--grey-500);
    text-align: center;
}

.attribution a {
    color: var(--purple-500);
}

.attribution a:hover, .attribution a:visited {
    color: var(--black);
}


@media screen and (max-width: 768px) {
    :root {
        --size-small: 14px;
        --size-regular: 20px;
        --size-big: 50px;
        --spacer-big: 30px;
        --spacer-medium: 10px;
    }

    .form-container fieldset {
        gap: 1em;
    }
}

@media screen and (max-width: 500px) {
    :root {
        --size-small: 10px;
        --size-regular: 16px;
        --size-big: 45px;
        --spacer-big: 15px;
    }

    main {
        width: 17em;
        border-bottom-right-radius: 100px;
    }

    .form-container fieldset {
        gap: 0.7em;
    }

    .hr1, .hr2 {
        width: 40%;
    }

    .submit {
        width: 4em;
        height: 4em;
        margin-top: var(--spacer-big);
        align-self: center;
    }

    .day-field, .month-field, .year-field {
        width: 30%;
    }

    .error-msg {
        width: 100%;
    }
}