* {
    transition: all ease-in-out 0.1s;
    scroll-behavior: smooth;
}

.blue {
    background-color: hsl(140, 33%, 50%);
}

:root {
    --bg-color1: hsl(210, 50%, 12%);
    --bg-color2: hsl(210, 50%, 12%);
    --bg-color3: hsl(210, 50%, 20%);
    --bg-color4: transparent;
    --bg-input: hsl(210, 50%, 85%);
    --accent-decent: hsl(210, 50%, 33%);
    --accent-color: hsl(210, 50%, 50%);
    --accent-light: hsl(210, 50%, 60%);
    --accent-orange: hsl(30, 50%, 50%);
    --color1: hsl(210, 50%, 85%);
    --color2: hsl(210, 50%, 75%);
    --color100: hsl(210, 50%, 100%);
    --color-input: hsl(210, 50%, 12%);
    --yellow: hsl(50, 100%, 67%);
    --blue: hsl(210, 100%, 67%);
    --shadow: hsl(210, 50%, 0%);
    --weather-icon: transparent;
    --border-radius: 12px;
}

.light-mode {
    --bg-color1: hsl(210, 50%, 25%);
    --bg-color2: hsl(210, 50%, 90%);
    --bg-color3: hsl(210, 50%, 95%);
    --bg-color4: transparent;
    --bg-input: hsl(210, 50%, 100%);
    --accent-decent: hsl(210, 50%, 67%);
    --accent-color: hsl(210, 50%, 50%);
    --accent-light: hsl(210, 50%, 50%);
    --accent-orange: hsl(30, 50%, 50%);
    --color1: hsl(210, 50%, 20%);
    --color2: hsl(210, 50%, 15%);
    --color100: hsl(210, 50%, 0%);
    --color-input: hsl(210, 50%, 15%);
    --yellow: hsl(50, 100%, 25%);
    --blue: hsl(210, 100%, 25%);
    --shadow: hsl(210, 50%, 20%);
    --weather-icon: radial-gradient(circle at center, var(--accent-decent), transparent 75%, transparent);
}

@font-face {
    font-display: swap;
    font-family: 'Noto Sans Mono';
    font-style: normal;
    font-weight: 400;
    src: url('dox/noto-sans-mono-v30-latin-regular.woff2') format('woff2');
}

body {
    background-color: var(--bg-color1);
    margin: 0;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 85%;
    color: var(--color1);
}

.main {
    display: none;
}

input {
    float: right;
    border: none;
    outline: none;
    margin: 24px 0 0 0;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    width: 120px;
    background-color: var(--bg-input);
    color: var(--color-input);
}

input:focus {
    outline: 3px solid var(--accent-color);
}

img {
    margin: 0 auto;
    width: 110px;
    /* border-radius: 40%; */
}

a {
    color: var(--color2);
    text-decoration: none;
}

a:hover {
    color: var(--color1);
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    font-weight: normal;
}

h1 {
    margin-left: 0px;
}

h2 {
    margin: 3px 0 20px 0px;
}

h3 {
    margin: 0;
    line-height: 2;
}

.sel {
    float: right;
}

.decent {
    color: var(--accent-light);
}

.invisible {
    opacity: 0;
}

.card {
    width: 800px;
    margin: 12px calc(50% - 425px);
    padding: 25px;
    background-color: var(--bg-color3);
    border-radius: var(--border-radius);
    overflow: auto;
    white-space: nowrap;
}

.card p {
    margin: 6px 0;
}

.favouritesIcon {
    width: 20px;
    margin: 0 0 0 12px;
}

.currentTiles,
.forecastTiles,
.threeDaysTiles {
    display: grid;
    column-gap: 6px;
    text-align: center;
}

.firstChild {
    position: static;
}

.currentTiles {
    grid-template-columns: 125px 100px auto;
    grid-template-areas: "legende werte icon";
    column-gap: 0;
}

.currentTiles > div:first-child {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    padding-right: 0;
}

.currentTiles > div:nth-child(2) {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    padding-left: 0;
}

/* .currentTiles br {
    display: none;
} */

.forecastTiles {
    grid-template-columns: 125px repeat(6, minmax(75px, 120px));
}

.threeDaysTiles {
    grid-template-columns: 125px repeat(2, 1fr);
    /* repeat(3, minmax(75px, 107.3px)) */
    grid-template-areas: "two three four";
}

.subTiles {
    display: grid;
    column-gap: 0;
    grid-template-columns: repeat(4, calc(25% - 9px));
    grid-gap: 0 12px;
}

.subTile {
    margin: 0 3px;
}

.tile {
    background-color: var(--bg-color2);
    padding: 6px 12px;
    border-radius: var(--border-radius);
}

hr {
    border: none;
    border-bottom: 1px solid var(--bg-color3);
}

.hrFat {
    border-bottom-width: 3px;
    margin: 12px 0;
}

.spacer-24 {
    width: 100%;
    height: 24px;
}

.icon {
    margin: 3px 0;
    width: 27px;
}

.weather-icon {
    background: var(--weather-icon);
    border-radius: 6px;
}

.toggle-icon {
    width: 25px;
    margin: 25px;
    padding: 0;
    float: right;
}

.update-icon {
    width: 25px;
    margin: 25px 0;
    padding: 0;
    float: right;
}

.unit {
    font-size: 92%;
}

#btnDarkMode {
    display: none;
}

.arrows {
    width: 36px;
    margin: 0 0 0 12px;
    float: right;
}

.arrows:hover {
    cursor: pointer;
    filter: brightness(120%);
}

.disabled {
    opacity: 0.2;
}

.disabled:hover {
    cursor: auto;
    filter: none;
}

/* .divTrendTemperatures {
    display: block;
} */

.sevenDaysScale {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--border-radius);
    background-color: var(--bg-color2);
}

.sevenDaysScale p {
    text-align: center;
}

.sevenDaysScale p:not(:last-child) {
    border-right: 1px solid var(--bg-color3);
}

.pseudoH4 {
    position: relative;
    top: 0px;
    left: 12px;
    opacity: 0.67;
}

#divTrendTemperatures,
#divTrendCloudCover,
#divTrendPrecipitation {
    position: relative;
    top: -12px;
    bottom: 0;
}

#divTrendTemperatureItems,
#divTrendCloudCoverItems,
#divTrendPrecipitationItems {
    display: grid;
    grid-template-columns: repeat(168, 1fr);
    gap: 0;
    padding: 12px;
    /* border-radius: var(--border-radius);
    background-color: var(--bg-color2); */
}

#divTrendTemperatureItems {
    height: 240px;
}

.trendTempLinePlus40,
.trendTempLinePlus20,
.trendTempLine0,
.trendTempLineMinus20,
.trendTempLineMinus40,
.trendPrecipitationLine100,
.trendPrecipitationLine50,
.trendPrecipitationLine0 {
    position: relative;
    margin: 0 12px;
    width: calc(100% - 24px);
    height: 0px;
    /* background-color: var(--accent-color);
    opacity: 0.15; */
}

.trendTempLinePlus40,
.trendTempLinePlus20,
.trendTempLineMinus20,
.trendTempLineMinus40,
.trendPrecipitationLine100,
.trendPrecipitationLine50,
.trendPrecipitationLine0 {
    border-bottom: solid 1px var(--accent-decent);
}

.trendTempLinePlus40 {
    top: 32px;
}

.trendTempLinePlus20 {
    top: 70px;
}

.trendTempLine0 {
    border-bottom: solid 3px var(--accent-decent);
    top: 108px;
}

.trendTempLineMinus20 {
    top: 142px;
}

.trendTempLineMinus40 {
    top: 180px;
}

.trendTempValuePlus40,
.trendTempValuePlus20,
.trendTempValue0,
.trendTempValueMinus20,
.trendTempValueMinus40,
.trendPrecipitationValue100,
.trendPrecipitationValue50,
.trendPrecipitationValue0 {
    position: absolute;
    left: -9px;
    font-size: 75%;
    text-align: end;
    opacity: 0.67;
}

.trendTempValuePlus40 {
    top: 25px;
}

.trendTempValuePlus20 {
    top: 62px;
}

.trendTempValue0 {
    top: 102px;
}

.trendTempValueMinus20 {
    top: 138px;
}

.trendTempValueMinus40 {
    top: 177px;
}

#divTrendPrecipitationItems {
    height: 60px;
}

.trendPrecipitationLine100 {
    top: 3px;
}

.trendPrecipitationLine50 {
    top: 32px;
}

.trendPrecipitationLine0 {
    top: 61px;
}

.trendPrecipitationValue100 {
    top: 0px;
}

.trendPrecipitationValue50 {
    top: 30px;
}

.trendPrecipitationValue0 {
    top: 59px;
}

.trendTemperatureItem,
.trendPrecipitationItem {
    z-index: 10;
    align-self: end;
    border-top-right-radius: 1px;
    border-top-left-radius: 1px;
}

.trendTemperatureItem {
    height: 3px;
    border-radius: 1px;
}

#divTrendCloudCoverItems {
    height: 24px;
}

.modal {
    display: none;
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translate(-50%, 0);
    width: calc(100% - 100px);
    max-width: 500px;
    z-index: 5;
    background-color: var(--bg-color3);
    padding: 12px;
    border-radius: var(--border-radius);
    box-shadow: 0 0 24px var(--shadow);
}

.modal p {
    background-color: var(--color1);
    color: var(--bg-color2);
    padding: 6px 12px;
    margin: 6px 12px;
    border-radius: var(--border-radius);
}

.modal p:hover {
    cursor: pointer;
    background-color: var(--accent-color);
    color: white;
}

.modal h2,
.modal h3 {
    text-align: center;
    color: var(--color1);
}

.modal h2 {
    margin: 24px;
}

.modal h3 {
    margin: 12px 0 18px 0;
}

.terms {
    width: 800px;
    margin: 12px calc(50% - 425px);
    padding: 25px;
    background-color: var(--bg-color2);
    border-radius: var(--border-radius);
}

.terms-p {
    font-size: 90%;
    text-align: center;
    color: var(--color2);
}

#linkToTerms:hover {
    cursor: pointer;
    text-decoration: underline;
    color: var(--color1);
}

#terms {
    display: none;
}

#closeTerms {
    display: none;
}

.alert {
    display: none;
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translate(-50%, 0);
    background-color: var(--bg-color3);
    color: var(--color1);
    opacity: 0.95;
    border-radius: var(--border-radius);
    border: solid 4px var(--accent-color);
    box-shadow: 0 0 24px var(--shadow);
    padding: 24px;
    text-align: center;
}

.loader {
    position: absolute;
    /* width: 100px;
    height: 100px; */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glow 2.5s ease-in-out infinite;
}

.toLeft {
    animation: toLeft 0.5s ease-in-out;
    animation-fill-mode: forwards;
}

@keyframes glow {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.swap {
    animation: swap 0.25s ease-in-out;
}

@keyframes swap {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.fade-in {
    animation: fade-in 0.25s ease-in-out;
}

.fade-in-slow {
    animation: fade-in 2s ease-out;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.rotate {
    animation: rotate 2s ease-in-out;
}

@keyframes rotate {
    0% {
        rotate: 0deg;
    }

    100% {
        rotate: 360deg;
    }
}

@media (max-width: 850px) {

    .card,
    .terms {
        margin: 0 0 12px 0;
        padding: 25px 12px;
        width: calc(100% - 24px);
        border-radius: 0;
    }

    .forecastTiles {
        grid-template-columns: 125px repeat(24, minmax(75px, 120px));
    }

    .threeDaysTiles {
        grid-template-columns: 125px auto auto auto auto;
    }

    .firstChild {
        position: sticky;
        left: 0;
        z-index: 3;
    }

    .terms {
        width: calc(100% - 24px);
    }
}

@media (max-width: 500px) {

    h1,
    h2 {
        margin-left: 0;
    }

    input {
        float: none;
        margin-top: 6px;
    }

    img {
        margin: 24px auto 12px auto;
        width: 60px;
    }

    .currentTiles {
        grid-template-columns: 120px 75px auto;
    }

    /* .currentTiles br {
        display: block;
    } */

    .sun-icon {
        margin: 18px 0 -8px 0;
    }

    .toggle-icon {
        margin: 10px 10px 0 0;
    }

    .update-icon {
        margin: 10px 10px 0 10px;
    }
}