@import url('https://fonts.googleapis.com/css?family=DM+Sans:400,700&display=swap');

:root {
    --duration: .8s;
    --half-duration: calc(var(--duration)/2);
    --ease: cubic-bezier(.7, 0, .3, 1);
}

*,
*:before,
*:after {
    box-sizing: border-box;
    position: relative;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: black;
    color: white;
    font-family: 'DM Sans', sans-serif;
}

img {
    max-width: 100%;
}

#app {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1;
    grid-template-rows: 25% 75%;
}

#canvasOne{
 
    align-items: center;
    height: 95%;
    aspect-ratio: 1.15/1;
}

.city {
    grid-column: 1;
    height: 100%;
    width: 100%;
    display: grid;
    gap: 10px;
    grid-template-columns: 5% 90% 5%;
    grid-template-rows: 10% 2fr 1fr 5%;
    grid-template-areas:
        "header header header"
        "rm_detail details lm_detail"
        "rm_search search lm_search"
        "footer footer footer";

    >.city-details {
        grid-area: details;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
    }
  
    >.search-bar {
        grid-area: search;
    }
}

.search-bar{
    width: 600px;
    background: #FFF;
    border-radius: 5px;
    margin: auto;
    z-index: 9;
}

#search-input {
    border-radius: 5px;
    margin: 2px;
    flex: 1;
    height: 40px;
    width: 100%;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 18px;
    color: #333;
}
#search-button{
    background: transparent;
    border: 0;
    outline: 0;
    padding: 5px;
    cursor: pointer;
    >.material-symbols-outlined{
        width: 25px;
        color: #555;
        font-size: 25px;

    }
}
    .row{
    display: flex;
    align-items: center;
    padding: 5px 15px;
}
::placeholder{
    color: #555;
}
.result-box{
    color: #333;
}
.result-box ul{
    border-top: 1px solid #999;
    padding: 5px 10px;

}
.result-box li{
    list-style: none;
    border-radius: 3px;
    padding: 10px 10px;
    cursor: pointer;
}
.result-box ul li:hover{
    background-color: #e9f3ff;
}

.detail {
    font-size: 5vmin;
    font-weight: 400;
    display: grid;
    grid-column: 2;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 2fr 1fr;
    grid-template-areas:
        "values symbol"
        "labels labels";

    margin-left: .4em;
    align-self: start;

    &::after {
        content: attr(data-postfix);
        grid-area: symbol;
    }

    &::before {
        display: flex;
        padding-right: .5rem;
        font-size: .75rem;
        text-transform: uppercase;
        opacity: 0.6;
        letter-spacing: 5px;
    }

    &[data-detail="latitude"]::before {
        content: 'latitude';
        grid-area: labels;
    }

    &[data-detail="longitude"]::before {
        content: 'longitude';
        grid-area: labels;
    }

    &[data-detail="temperture"]::before {
        content: 'Temperature';
        grid-area: labels;
    }
}
.detail-time{
    font-size: 5vmin;
    font-weight: 400;
    display: grid;
    grid-column: 2;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    grid-template-areas:
        "values"
        "labels";

    margin-left: .4em;
    align-self: start;
    float: left;

    &::before {
        display: flex;
        padding-right: .15rem;
        font-size: .75rem;
        text-transform: uppercase;
        opacity: 0.6;
        letter-spacing: 3px;
    }

    &[data-detail="time"]::before {
        content: 'time';
        grid-area: labels;
    }
}

h1,
h2 {
    margin: 0;
}



#app {
    overflow: hidden;
}

.city-nav {
    grid-column: 1;
    grid-row: 2;
    pointer-events: none;
    z-index: 10;
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    svg {
        display: block;
        width: auto;
        height: auto;
        min-width: 100%;
        max-width: none;
        min-height: 100vh;
        margin-bottom: -50%;

        @media (max-width: 600px) {
            margin-bottom: -55%;
        }
    }

    tspan {
        cursor: pointer;
        fill: #FFF;
        pointer-events: auto;
        opacity: 0;
        transition: opacity var(--duration) linear;

        &[x] {
            opacity: 0.6;
        }

        &:hover,
        &:focus {
            opacity: 1;
        }
    }

    svg {
        transform-origin: center center;
        --length: 7;
        --range: 0deg;

        transform: rotate(calc((var(--active, 0) / var(--length)) * (-1 * var(--range)) + (var(--range) / 2)));

        transition: transform var(--duration) var(--ease);
    }

    tspan {
        cursor: pointer;
    }
}