@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&display=swap');

:root {
    --font: 'Rubik', sans-serif;

    --very-dark-gray: hsl(0, 0%, 17%);
    --dark-gray: hsl(0, 0%, 59%);
}

* {
    padding: 0;
    margin: 0;
    font-family: var(--font);
    font-size: 18px;

}

header {
    height: 40vh;
    background: url(../images/pattern-bg-mobile.png) no-repeat;
    background-size: cover;
    display: grid;
    grid-template-rows: auto;
    row-gap: 20px;
    justify-items: center;
}

header h1 {
    color: white;
    font-size: 1.3em;
    font-weight: 500;
    text-align: center;
    margin-top: 20px;
}

header form {
    display: grid;
    grid-template-columns: 230px 50px;
    column-gap: 15px;
}

form input {
    padding: 10px;
    width: 100%;
    border: none;
    outline: none;
    line-height: 25px;
}

form #ip {
    border-radius: 10px 0 0 10px;
    padding-left: 20px;
    font-weight: 400;
}

form #submit {
    border-radius: 0 10px 10px 0;
    font-weight: 800;
    color: white;
    background: var(--very-dark-gray);
}

form #submit:hover {
    background: var(--dark-gray);
}

#result {
    width: 300px;
    background: white;
    z-index: 1;
    text-align: center;
    border-radius: 15px;
}

#result div {
    margin: 20px 0;
 }

#result div h3 {
    color: var(--dark-gray);
    font-size: .6em;
 }

#result div p {
    margin-top: 7px;
    font-weight: 500;
}

#map {
    height: 60vh;
    z-index: 0;
}

.error {
    outline: 2px solid red;
}

@media screen and (min-width: 768px) {
    header {
        height: 35vh;
        background: url(../images/pattern-bg-desktop.png) no-repeat;
        background-size: cover;
        row-gap: 40px;
    }
    header form {
        display: grid;
        grid-template-columns: 450px 50px;
        column-gap: 15px;
    }
    #result {
        width: 80vw;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-template-rows: minmax(130px, auto) ;
        justify-content: flex-start;
    }
    #result div {
        margin: 20px;
        border-right: 1px solid var(--dark-gray);
        text-align: left;
    }
    #result div:last-child {
        border-right: none;
    }
    #result div h3 {
        font-size: .7em;
    }
    #result div p {
        margin-top: 15px;
    }
    #result div p, #result div span {
        font-size: 1.1em;
    }
    #map {
        height: 65vh;
    }
}