/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Galen's code */
body {
    font-family: 'Libre Franklin', sans-serif;
    display: flex;
    flex-direction: column;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    max-width: 4rem;
    padding-top: 2rem;
}

h1 {
    font-weight: 300;
    color: hsl(0, 0%, 59%);
    font-size: 1.5rem;
    padding-top: 2rem;
}

strong {
    font-weight: 700;
    color: black;
}

main p {
    padding: 1rem;
}

form {
    display: flex;
    flex-direction: column;
    padding: 0rem 2rem;
    width: 100%;
    margin-top: 1rem;
}

input {
    padding: .7rem 2rem;
    border-radius: 2rem;
    border-style: solid;
    margin: .7rem 0rem;
    font-size: .9rem;
}

input::placeholder {
    color: hsl(0, 0%, 59%);
}

input:focus {
    outline: none;
}

button {
    padding: .7rem;
    border-radius: 2rem;
    border-style: solid;
    font-size: .9rem;
    background-color: hsl(223, 87%, 63%);
    color: white;
    font-weight: 600;
}

button:active {
    filter: brightness(1.2)
}

.error {
    display: none;
    color: hsl(354, 100%, 66%);
    font-size: .85rem;
    align-self: center;
    margin: -.3rem 0 1rem 0;
}

.dashboard {
    margin-top: 4rem;
    max-width: 20rem;
}

footer {
    position: absolute;
    bottom: 0;
    text-align: center;
    align-self: center;
}

.share {
    display: flex;
    justify-content: space-evenly;
    padding: 0rem 3rem;
}

.icon {
    border-radius: 100%;
    border: 1px solid lightgray;
    padding: .7rem;
}

.icon:active {
    background: hsl(223, 87%, 63%);
}


.icon img {
    width: 1rem;
    height: 1rem;
    filter: invert(51%) sepia(44%) saturate(4649%) hue-rotate(206deg) brightness(96%) contrast(98%);
}

.icon:active img {
    filter: invert(100%) sepia(1%) saturate(0%) hue-rotate(186deg) brightness(103%) contrast(101%);
}

.copyright {
    color: hsl(0, 0%, 59%);
    font-size: .8rem;
    margin: 1.8rem;
}

.attribution {
    font-size: 11px;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

@media (min-width: 800px) {

    /*Tablet view */
    body {
        justify-content: space-around;
    }

    main p {
        padding: .5rem;
        font-size: 0.9rem;
    }

    form {
        flex-direction: row;
        justify-content: center;
    }

    input {
        margin: 0rem .5rem;
        padding-right: 7rem;
    }

    .error {
        margin: 5.7rem 13rem 0 0;
        position: absolute;
    }

    button {
        padding: .7rem 3rem;
    }

    .dashboard {
        margin-top: 10rem;
        max-width: 35rem;
    }

    footer {
        position: relative;
    }

    .share {
        margin-top: 1rem;
    }

    .copyright {
        margin: .8rem;
    }
}

@media (min-width: 1000px) {

    /*Desktop view */
    .dashboard {
        margin-top: 2rem;
        max-width: 30rem;
    }

    .error {
        margin: 5.7rem 13rem 0 0;
        position: absolute;
    }

}

/* Javascript classes */
.display-error {
    display: flex;
}

.input-error {
    border-color: hsl(354, 100%, 66%);
}