:root {
    --akzentfarbe: #2563eb;
    --seitenfarbe-oben: #f5f5f8;
    --seitenfarbe-unten: #dcdcdf;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: black;
    background: linear-gradient(160deg, var(--seitenfarbe-oben), var(--seitenfarbe-unten));
    font-family: Audiowide, sans-serif;
}

.seitenkopf, main, footer {
    width: min(100% - 2rem, 760px);
    margin-inline: auto;
}

main {
    flex: 1;
}

/*---DESIGN SEITENKOPF---*/
.seitenkopf h1 {
    font-size: 3rem;
    margin-bottom: 0;
}

.seitenkopf h3 {
    font-size: 1.12rem;
    margin-top: 0;
}

/*---DESIGN SUCHFORMULAR---*/
.suchFormular {
    max-width: 48rem;
    margin-top: 1.5rem;
    margin-inline: auto;
    padding: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #2d7dd2, #59b4e8);
    border-radius: 2rem;
    box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 15%);
}

.suchFormular label {
    display: block;
    font-size: 1.5rem;
}

.suchzeile {
    display: flex;
    gap: 0.75rem;
}

.suchzeile input {
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 2px solid white;
}

.suchzeile button {
    padding: 0.75rem 1.25rem;
    border: 0;
    color: black;
    background: white;
    font-weight: bold;
    cursor: pointer;
}

.suchzeile button:hover {
    background: #dbeafe;
}

.suchzeile input, .suchzeile button, .standort {
    min-height: 3rem;
    border-radius: 0.65rem;
    font: inherit;
}

.standort {
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    border: 0;
    color: black;
    background: white;
    cursor: pointer;
    width: 100%;
}

.standort:hover {
    background: #dbeafe;
}

.suchVerlauf {
    margin-top: 2rem;
}

.suchVerlaufListe {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suchVerlaufListe button {
    padding: 0.75rem 1.25rem;
    border: 0;
    color: black;
    background: white;
    cursor: pointer;
    min-height: 3rem;
    border-radius: 0.65rem;
    font: inherit;
}

.suchVerlaufListe button:hover {
    background: #dbeafe;
}

/*---DESIGN FEHLERMELDUNG---*/
.fehlermeldung {
    max-width: 32rem;
    margin: 1rem auto;
    padding: 1rem;
    color: #8a1c1c;
    background: #ffe5e5;
    border-radius: 0.5rem;
    text-align: center;
}

/*---DESIGN SPINNER---*/
[hidden] {
    display: none !important;
}

.ladevorgang {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #bfdbfe;
    border-top-color: var(--akzentfarbe);
    border-radius: 50%;
    animation: drehen 0.8s linear infinite;
}

@keyframes drehen {
    to {
        transform: rotate(360deg);
    }
}

/*---DESIGN WETTERKARTE---*/
.aktuellesWetter {
    margin-top: 0;
}

.ortAnzeige {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.ortName {
    font-size: 2rem;
    margin-top: 0.5rem;
}

.ortZeile {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.temperaturAnzeige {
    margin-right: 1rem;
    white-space: nowrap;
}

.temperatur {
    font-size: 6rem;
    font-weight: bold;
    margin: 0;
}

.wetterAnzeige {
    max-width: 48rem;
    margin-top: 1.5rem;
    margin-inline: auto;
    padding: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #2d7dd2, #59b4e8);
    border-radius: 2rem;
    box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 15%);
}

.wetterInfo {
    display: grid;
    grid-template-columns: auto auto;
    max-height: 10rem;
}

.wetterDetails {
    display: flex;
    gap: 4.5rem;
}

.wetterZustand {
    margin-bottom: 0.5rem;
}

.wetterIcon {
    font-size: 10rem;
}

.wetterIcons {
    display: flex;
}

.angabeLuft, .angabeWind {
    font-size: 1.5rem;
}

.luftfeuchtigkeit, .wind {
    margin-bottom: 0.5rem;
}

/*---DESIGN FAVORIT-BUTTON---*/
.favoritButton {
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.favoritIcon {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.iconGefuellt {
    display: none;
}

.favoritButton.istFavorit .iconLeer {
    display: none;
}

.favoritButton.istFavorit .iconGefuellt {
    display: block;
}

.favoritButton:hover {
    color: #dbeafe;
}

/*---DESIGN FAVORITENLISTE---*/
.favoriten {
    margin-top: 2rem;
}

.favoritenListe {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem;
}

.favoritKarte {
    position: relative;
    min-width: 0;
}

.favoritInhalt {
    width: 100%;
    min-height: 6.5rem;
    display: grid;
    gap: 0.65rem;
    padding: 1rem 2.75rem 1rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    color: black;
    background: white;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.favoritInhalt:hover {
    background: #dbeafe;
}

.favoritOrt {
    overflow-wrap: anywhere;
    margin: 0;
}

.favoritWetter {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
}

.favoritWetterIcon {
    font-size: 1.75rem;
    margin: 0;
}

.favoritTemperatur {
    font-weight: bold;
    margin: 0;
}

.favoritEntfernen {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #1f2937;
    background: transparent;
    font: 1.5rem/1 sans-serif;
    cursor: pointer;
}

.favoritEntfernen:hover {
    color: #dc2626;
}

/*---DESIGN TOGGLE-SWITCH---*/
.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: #2563eb;
    transition: 0.4s;
    border-radius: 50%;
}

.slider:hover {
    background-color: #dbeafe;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.tempEinheit {
    display: flex;
    align-items: flex-start;
}

.tempEinheitToggle {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/*---DESIGN 7-TAGE-VORHERSAGE---*/
.vorhersage {
    max-width: 48rem;
    margin-top: 1.5rem;
    margin-inline: auto;
    padding: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #2d7dd2, #59b4e8);
    border-radius: 2rem;
    box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 15%);
}

.vorhersage h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.vorhersageListe {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.vorhersageTag, .vorhersageTemperatur{
    display: grid;
    justify-items: center;
}

.vorhersageTag {
    padding: 0.5rem 1rem;
    border: 0;
    color: black;
    background: white;
    border-radius: 0.65rem;
    font: inherit;
}

.vorhersageIcon {
    font-size: 2rem;
    margin: 0;
}

.vorhersageWochentag {
    margin-top: 0;
}

.vorhersageTemperatur {
    margin-bottom: 0;
}

/*---DESIGN FOOTER---*/
footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/*---KOMPAKTERES DESIGN---*/
@media (min-width: 620px) {
    .suchzeile {
        flex-direction: row;
    }

    .suchzeile input {
        flex: 1;
    }

    .wetterDetails {
        grid-template-columns: repeat(2, 1fr);
    }
}
