@font-face {
    font-family: "Cabin";
    src: url("Cabin/static/Cabin-Regular.ttf");
}

:root {
    --font-color: #F8E8D0;
}

body {
    min-height: 100dvh;
    min-width: 100lvw;
    padding: 1rem 1rem 0 1rem;
    margin: 0;
    background: rgb(28, 125, 177);
    /* background: linear-gradient(180deg, rgba(28,125,177,1) 0%, rgba(212,234,237,1) 100%); */
    background-image: url('images/background.jpeg');
    background-size: cover;
    backdrop-filter: blur(50px);
    color: var(--font-color);
    font-family: "Cabin";
}

header {
    display: flex;
    gap: 1rem;
    width: 100%;
}

#search-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    align-items: center;
    min-height: 5vh;
    border: 1px solid whitesmoke;
    border-radius: 1rem;
    height: 2rem;
    width: 100%;
}

#logo {
    display: inline-block;
    height: 2rem;
    width: 2rem;
    background-color: #F2B319;
    border-radius: 50%;
}

#search-bar label {
    width: 100%;
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

#search-input {
    border: none;
    color: inherit;
    width: 100%;
    padding-left: 13px;
    background: transparent;
}

::placeholder {
    color: aliceblue;
    opacity: .5;
}

#search-input:focus-visible {
    border: none;
    background-color: transparent;
    outline: none;
}

#search-bar button {

    background: transparent;
    border-radius: 5px;
    border: none;
    padding: 10px;
    color: var(--font-color);
}

#search-bar button:hover {
    cursor: pointer;
}

#location-display {
    position: absolute;
    z-index: 5;
    top: 2rem;
    left: -1px;
    width: 100%;
    background: linear-gradient(#50a6cf, #6a8d9d);
    backdrop-filter: blur(10px);
    -webkit-box-shadow: inset 0px 5px 30px -10px rgb(0, 94, 255);
    box-shadow: inset 0px 5px 30px -10px #406171;
    display: flex;
    flex-direction: column;
    border: 1px solid whitesmoke;
    border-top: none;
    padding-bottom: .5rem;
    border-radius: 0 0 1rem 1rem;
    max-height: 40vh;
    overflow-y: scroll;
}

.location-flag {
    width: 1rem;
    height: 1rem;
}

.location-item {
    display: flex;
    justify-content: start;
    align-items: center;
    min-height: 2rem;
    gap: 1rem;
    padding-left: .5rem;
    border-top: 1px solid rgba(6, 26, 255, .1);
}

.location-item:hover {
    cursor: pointer;
}

main {
    min-height: 80dvh;
}

#weather-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 1rem;
}

h1 {
    font-size: 60px;
}

#cards-container {
    display: grid;
    width: 100%;
    gap: 1rem;
    margin-top: 2rem;
    grid-template-columns: repeat(7, 200px);
    overflow-x: auto;
    user-select: none;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: rgba(6, 26, 64, .1);
    border-radius: 1rem;
    position: relative;
}

.card:hover {
    background: linear-gradient(180deg,
            rgba(6, 26, 64, .2) 0%,
            rgba(6, 26, 64, .1) 100%);
}

/* Rain animation try:  */
/* .card::after{
    overflow: hidden;
    content: '';
    position: absolute;
    background-size: contain;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: -1;
}

.card:hover::after{
    background-image: url('https://media.geeksforgeeks.org/wp-content/uploads/20200828184719/rain-300x300.png');
    animation: drop 1s linear infinite;
}  */

.card span {
    margin-top: 1rem;
}

.card img {
    /* filter: saturate(1); */
    width: 50%;
    object-fit: cover;
}

.card:hover {
    cursor: pointer;
}

h3 {
    margin: 0;
    margin-bottom: .5rem;
}



.hour-display {
    font-size: 0.75rem;
    grid-column: 1 / 8;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(6, 26, 64, .2);
    border-radius: 0 0 1rem 1rem;
    overflow-x: scroll;
    animation: 1s ease-in-out linear;
    margin-bottom: 3rem;

}

.hour-display img {
    max-width: 80%;
    margin: auto;
}

.hour-display:hover {
    cursor: pointer;
    background: rgba(6, 26, 64, .2);
    background: rgb(14, 28, 36);
    background: linear-gradient(180deg,
            rgba(6, 26, 64, .2) 0%,
            rgba(6, 26, 64, .3) 100%);
}



.selected {
    border-radius: 1rem 1rem 0 0;
    background-color: rgba(6, 26, 64, .2);
    transform-origin: top;
    transform: scaleY(107.4%);
    /* animation: scaleY(107.4%) 15s linear; */
    transition: transform 0.1s linear;
    overflow: hidden;
}

.selected:hover {
    background: linear-gradient(180deg,
            rgba(6, 26, 64, .3) 0%,
            rgba(6, 26, 64, .2) 100%);
}

.selected:hover ~ .hour-display{
    background: linear-gradient(180deg,
    rgba(6, 26, 64, .2) 0%,
    rgba(6, 26, 64, .3) 100%);
}

.hour-card {
    display: flex;
    flex-direction: column;

}

footer {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 1rem;
}

@keyframes select {
    0% {
        transform: scaleY(100%);
    }

    100% {
        transform: scaleY(107.4%);
    }
}