﻿

:root {
    --bg-1: #e9edf2;
    --bg-2: #dde3ea;
    --card: #f8fafc;
    --text: #172033;
    --muted: #667085;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 12px 35px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}


html,
body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient( 180deg, var(--bg-1) 0%, var(--bg-2) 100% );
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.4;
}


/* Sida */

.weather-page {
    width: 100%;
    min-height: 100vh;
}


/* Main container*/

.weather-container {
    max-width: 980px;
    margin: 36px auto;
    padding: 28px;
    background: #f7f9fb;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    box-sizing: border-box;
}


    /* rubriker */

    .weather-container h1 {
        margin: 0 0 25px 0;
        font-size: 30px;
        font-weight: 700;
        letter-spacing: -0.5px;
    }


    .weather-container h2 {
        margin: 0 0 18px 0;
        font-size: 20px;
        font-weight: 650;
    }


/* video */

.weather-video-container {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 35px;
    background: #dfe4e9;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}


.weather-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* dashboard */

.weather-comparison {
    width: 100%;
}


.comparison-section {
    margin-bottom: 35px;
}


/* idag */

.today-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}


.today-item {
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}


.comparison-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
}


.today-value {
    display: block;
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -0.5px;
}


/* veckan */

.week-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}


.week-item {
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}


.week-value {
    display: block;
    margin-bottom: 5px;
    font-size: 23px;
    font-weight: 650;
}


.week-day {
    display: block;
    color: var(--muted);
    font-size: 14px;
}


/* jämförelse */

.comparison-result {
    margin-top: 10px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}


.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}


.result-item {
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}


.result-title {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
}


.result-item strong {
    font-size: 15px;
    line-height: 1.5;
}


/* visa prognoser knapp */

.forecast-button {
    display: block;
    margin: 40px auto 10px auto;
    padding: 14px 28px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}


    .forecast-button::after {
        content: "→";
        display: inline-block;
        margin-left: 8px;
        transition: transform 0.2s ease;
    }


    .forecast-button:hover {
        background: #f8fafc;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.05);
    }


        .forecast-button:hover::after {
            transform: translateX(4px);
        }


    .forecast-button:active {
        transform: translateY(0);
        box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
    }


/* tillbaka knappar */

.back-button {
    display: block;
    padding: 13px 25px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}


    .back-button:hover {
        background: #f8fafc;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.11);
    }


    .back-button:active {
        transform: translateY(0);
    }


/* övre tillbaka */

#backButton {
    margin: 0 0 25px 0;
}


/* nedre tillbaka */

#backButtonBottom {
    margin: 40px auto 10px auto;
}


.bottom-back-button {
    min-width: 150px;
}


/*prognoser */

.forecast-day {
    margin-top: 50px !important;
    margin-bottom: 18px !important;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 20px !important;
}


.weather-container > .forecast-day:first-of-type {
    margin-top: 20px !important;
}


/* weather row */

.weather-row {
    display: grid;
    grid-template-columns: 80px 100px 120px 1fr;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
}


.weather-time {
    font-size: 14px;
    font-weight: 600;
}


.weather-temperature {
    font-size: 16px;
    font-weight: 650;
}


.weather-wind {
    color: var(--muted);
    font-size: 14px;
}


.weather-symbol {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 14px;
}


.weather-emoji {
    font-size: 20px;
}


/* mobil */

@media (max-width: 800px) {

    .weather-container {
        margin: 15px;
        padding: 20px;
    }


        .weather-container h1 {
            font-size: 26px;
        }


    .weather-video-container {
        height: 280px;
    }


    .today-grid {
        grid-template-columns: 1fr;
    }


    .week-grid {
        grid-template-columns: 1fr;
    }


    .result-grid {
        grid-template-columns: 1fr;
    }


    .weather-row {
        grid-template-columns: 70px 90px 1fr;
        gap: 10px;
    }


    .weather-wind {
        display: none;
    }


    .weather-symbol {
        justify-content: flex-end;
    }


    .forecast-button {
        width: 100%;
        margin-top: 30px;
    }


    .back-button {
        width: 100%;
    }
}


/* 
   smala skärmar
    */

@media (max-width: 480px) {

    .weather-container {
        margin: 10px;
        padding: 16px;
        border-radius: 14px;
    }


    .weather-video-container {
        height: 220px;
    }


    .today-value {
        font-size: 24px;
    }


    .week-value {
        font-size: 21px;
    }


    .weather-row {
        grid-template-columns: 60px 80px 1fr;
        padding: 13px;
    }


    .weather-symbol {
        font-size: 13px;
    }


    .weather-emoji {
        font-size: 18px;
    }
}
