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

:root {
    --veryDarkGray:hsl(0, 0%, 17%);
    --darkGray: hsl(0, 0%, 59%);
}

body {
    display: grid;
    grid-template-rows: 1fr 2fr;
    grid-template-columns: 1fr;
    height: 100vh;
    font-family: "Rubik", sans-serif;
}

.header {
    background-image: url(images/pattern-bg.png);
    background-size: cover;
    padding: 0 40px;
    font-size: 18px;
}

.tittle{
    position: absolute;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    text-align: center;
    color: #fafafa;
    font-size: 28px;
}

.search-bar{
    position: relative;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    height: 50px;
    font-size: 18px;
    border-radius: 12px;
    overflow: hidden;
}

#ip-input {
    width: 90%;
    height: 100%;
    outline: none;
    padding: 0 20px;
    border: none;
    background: #efe9e1;
    font-size: 18px;
    font-family: "Rubik", sans-serif;
}

#ip-input:hover{
    background: #e0dbd3;
}

#search-btn{
    display: flex;
    justify-content: center;
    align-items: center;
    float: right;
    width: 10%;
    height: 100%;
    border: none;
    outline: none;
    background: hsl(0, 0%, 17%);
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#search-btn:hover {
    background: hsl(0, 0%, 24%);
}

.data {
    position: relative;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    max-width: 1000px;
    padding: 20px;
    background: #efe9e1;
    box-shadow: 0px 4px 16px -4px grey;
    color: var(--veryDarkGray);
    border-radius: 20px;
    z-index: 1;
}

.data section {
    padding: 10px;
    width: 158px;
    font-size: 18px;
    font-weight: bold;
}

.data section:not(:first-child) {
    border-left: 1px solid lightgrey;
}

.data-tittle {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--darkGray);
}

#mapid {
    position: relative;
    background: #4a4dad;
    z-index: -1;
}

.attribution {
    position: fixed;
    left: 10px;
    bottom: 2px;
    font-size: 11px;
    text-align: center;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

#loading {
    position: absolute;
    top: 9px;
    right: 60px;
    width: 32px;
    height: 32px;
    border: 4px solid #4a4dad;
    border-top: 4px dotted transparent;
    border-radius: 100%;
    visibility: hidden;
    opacity: 0.7;
    animation: spin 1s infinite linear;
}

#loading.display {
    visibility: visible;
}

@-webkit-keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 768px) {
    .tittle {
        top: 10px;
        font-size: 24px;
    }

    .search-bar {
        top: 50px;
    }

    .data {
        position: absolute;
        top: 120px;
        padding: 4px;
        display: block;
        width: 70%;
    }

    .data section {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
        font-size: 16px;
        border: none;
    }

    .data-tittle {
        margin-bottom: 5px;
    }
}

@media screen and (max-width: 500px) {
    .tittle {
        font-size: 18px;
    }
}