/* =========================================================
   DAGENS LUFT – DALAPLAN
   Ren och strukturerad CSS
   Storlek: 465 × 536 px
   ========================================================= */


/* ---------------------------------------------------------
   1. GRUNDINSTÄLLNINGAR
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #f4f6f8;
    color: #26343d;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}


/* ---------------------------------------------------------
   2. SIDANS STORLEK OCH HUVUDKORT
   --------------------------------------------------------- */

.page {
    width: 100%;
    min-width: 330px;
    max-width: 465px;
    height: 536px;
    margin: 0 auto;
    padding: 3px;
}

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

    width: 100%;
    height: 530px;

    background: #ffffff;
    border: 1px solid #d8e0e6;
    border-radius: 9px;

    overflow: hidden;
    box-shadow: 0 1px 4px rgba(20, 45, 60, 0.08);
}


/* ---------------------------------------------------------
   3. LOGOTYP OCH SIDHUVUD
   --------------------------------------------------------- */

.logo-area {
    display: flex;
    align-items: center;

    width: 100%;
    height: 64px;
    flex: 0 0 64px;

    padding: 3px 11px;
    background: #ffffff;
}

.logo {
    display: block;

    width: 105px;
    max-height: 54px;
    height: auto;

    object-fit: contain;
}

.logo-divider {
    width: 2px;
    height: 38px;

    margin: 0 10px;

    background: #075b9c;
    border-radius: 2px;
}

.logo-text {
    color: #075486;
}

.logo-title {
    font-size: 16px;
    line-height: 1.05;
    font-weight: 700;
}

.logo-subtitle {
    margin-top: 2px;

    color: #66747d;
    font-size: 11px;
    line-height: 1.1;
}


/* ---------------------------------------------------------
   4. FÄRGLINJE
   --------------------------------------------------------- */

.color-line {
    width: 100%;
    height: 3px;
    flex: 0 0 3px;

    background: linear-gradient(
        to right,
        #78a900 0%,
        #78a900 25%,
        #075181 25%,
        #075181 100%
    );
}


/* ---------------------------------------------------------
   5. STATIONSMENY
   --------------------------------------------------------- */

.station-menu {
    display: flex;

    width: 100%;
    height: 28px;
    flex: 0 0 28px;

    background: #ffffff;
    border-bottom: 1px solid #dce4e9;

    overflow: hidden;
}

.station-menu a {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1;
    min-width: 0;

    padding: 1px 2px;

    color: #075b9c;
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    text-align: center;
    text-decoration: none;

    border-right: 1px solid #e3e8ec;
}

.station-menu a:last-child {
    border-right: none;
}

.station-menu a.active {
    background: #edf5fa;
    font-weight: 700;

    box-shadow: inset 0 -2px 0 #075b9c;
}

.station-menu a:hover {
    background: #f5f9fc;
}


/* ---------------------------------------------------------
   6. FOKUS FÖR TANGENTBORDSNAVIGERING
   --------------------------------------------------------- */

.station-menu a:focus-visible,
.download-button:focus-visible,
.parameter-button:focus-visible,
.navigation a:focus-visible {
    outline: 2px solid #075b9c;
    outline-offset: -2px;
    border-radius: 3px;
}


/* ---------------------------------------------------------
   7. DIAGRAM
   --------------------------------------------------------- */

.diagram {
    width: 100%;
    flex: 0 0 auto;

    padding: 1px 2px 0;

    background: #ffffff;
    overflow: visible;
}

.diagram img {
    display: block;

    width: 100%;
    max-width: 445px;
    height: auto;

    margin: 0 0 0 -14px;
}


/* ---------------------------------------------------------
   8. INFORMATIONSRUTA
   --------------------------------------------------------- */

/*
   Textrutan är den enda flexibla delen av sidan.
   Texten börjar alltid uppe till vänster.
*/

.info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;

    flex: 1 1 auto;
    min-height: 0;

    margin: 3px 7px;
    padding: 7px 12px;

    background: #ffffff;
    border: 1px solid #d9e2e8;
    border-radius: 6px;

    color: #26343d;
    font-size: 11px;
    line-height: 1.28;
    text-align: left;

    overflow: hidden;
}

.info p {
    margin: 0;
    padding: 0;
}

.info strong {
    color: #075181;
    font-weight: 700;
}


/* ---------------------------------------------------------
   9. LADDA NER DATA
   --------------------------------------------------------- */

.download-data {
    display: flex;
    align-items: center;
    gap: 4px;

    width: auto;
    height: 29px;
    flex: 0 0 29px;

    margin: 0 7px 2px;
    padding: 3px 5px;

    background: #edf5fa;
    border: 1px solid #e0ebf1;
    border-radius: 6px;
}

.download-title {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.download-buttons {
    display: flex;
    gap: 3px;
    margin-left: auto;
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 22px;
    padding: 0 5px;

    background: #ffffff;
    border: 1px solid #075b9c;
    border-radius: 4px;

    color: #075b9c;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.download-button:hover {
    background: #f4f9fc;
}


/* ---------------------------------------------------------
   10. NEDLADDNINGSIKON
   --------------------------------------------------------- */

.download-icon {
    position: relative;

    width: 22px;
    min-width: 22px;
    height: 20px;
}

.download-icon::before {
    content: "";

    position: absolute;
    left: 10px;
    top: 1px;

    width: 2px;
    height: 12px;

    background: #075b9c;
    border-radius: 2px;
}

.download-icon::after {
    content: "";

    position: absolute;
    left: 6px;
    top: 8px;

    width: 8px;
    height: 8px;

    border-right: 2px solid #075b9c;
    border-bottom: 2px solid #075b9c;

    transform: rotate(45deg);
}

.download-icon span {
    position: absolute;
    left: 3px;
    bottom: 1px;

    width: 17px;
    height: 2px;

    background: #075b9c;
    border-radius: 2px;
}


/* ---------------------------------------------------------
   11. FLER TRENDER
   --------------------------------------------------------- */

.trends {
    display: flex;
    align-items: center;
    gap: 4px;

    width: auto;
    height: 29px;
    flex: 0 0 29px;

    margin: 0 7px 2px;
    padding: 3px 5px;

    background: #edf5fa;
    border: 1px solid #e0ebf1;
    border-radius: 6px;
}

.trend-title {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.parameter-buttons {
    display: flex;
    gap: 3px;
    margin-left: auto;
}

.parameter-button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 22px;
    padding: 0 4px;

    background: #ffffff;
    border: 1px solid #075b9c;
    border-radius: 4px;

    color: #075b9c;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.parameter-button:hover {
    background: #f4f9fc;
}


/* ---------------------------------------------------------
   12. TRENDIKON
   --------------------------------------------------------- */

.trend-icon {
    position: relative;

    width: 22px;
    min-width: 22px;
    height: 20px;
}

.trend-icon::before {
    content: "";

    position: absolute;
    left: 1px;
    bottom: 2px;

    width: 20px;
    height: 1px;

    background: #075b9c;
}

.trend-icon span {
    position: absolute;
    bottom: 3px;

    width: 3px;

    border: 1.5px solid #075b9c;
}

.trend-icon span:nth-child(1) {
    left: 3px;
    height: 6px;
}

.trend-icon span:nth-child(2) {
    left: 9px;
    height: 11px;
}

.trend-icon span:nth-child(3) {
    left: 15px;
    height: 16px;
}

.trend-icon::after {
    content: "";

    position: absolute;
    left: 3px;
    top: 4px;

    width: 18px;
    height: 10px;

    border-top: 1.5px solid #075b9c;
    border-right: 1.5px solid #075b9c;

    transform: skewY(-28deg);
}


/* ---------------------------------------------------------
   13. NEDRE NAVIGATION
   --------------------------------------------------------- */

.navigation {
    display: flex;

    width: 100%;
    height: 31px;
    flex: 0 0 31px;

    background: #ffffff;
    border-top: 1px solid #dce4e8;
}

.navigation a {
    display: flex;
    align-items: center;

    flex: 1;
    height: 31px;

    padding: 1px 8px;

    text-decoration: none;
}

.navigation a:first-child {
    border-right: 1px solid #dce4e8;
}

.nav-text {
    flex: 1;

    color: #075b9c;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

.nav-arrow {
    color: #075b9c;
    font-size: 17px;
    line-height: 1;
    font-weight: 300;
}


/* ---------------------------------------------------------
   14. KARTIKON
   --------------------------------------------------------- */

.location-icon {
    position: relative;

    width: 20px;
    min-width: 20px;
    height: 21px;

    margin-right: 4px;

    transform: scale(0.68);
}

.location-icon::before {
    content: "";

    position: absolute;
    left: 3px;
    top: 0;

    width: 17px;
    height: 21px;

    border: 2px solid #075b9c;
    border-radius: 50% 50% 50% 0;

    transform: rotate(-45deg);
}

.location-icon::after {
    content: "";

    position: absolute;
    left: 9px;
    top: 6px;

    width: 6px;
    height: 6px;

    border: 2px solid #075b9c;
    border-radius: 50%;
}


/* ---------------------------------------------------------
   15. SMALA SKÄRMAR
   --------------------------------------------------------- */

@media (max-width: 380px) {

    .page {
        min-width: 330px;
        max-width: 380px;
        height: 536px;
        padding: 2px;
    }

    .card {
        height: 532px;
        border-radius: 8px;
    }


    /* Sidhuvud */

    .logo-area {
        height: 61px;
        flex: 0 0 61px;
        padding: 3px 6px;
    }

    .logo {
        width: 88px;
        max-height: 49px;
    }

    .logo-divider {
        height: 34px;
        margin-left: 6px;
        margin-right: 6px;
    }

    .logo-title {
        font-size: 15px;
    }

    .logo-subtitle {
        font-size: 11px;
    }


    /* Stationsmeny */

    .station-menu {
        height: 28px;
        flex: 0 0 28px;
    }

    .station-menu a {
        padding: 1px;
        font-size: 11px;
    }


    /* Diagram */

    .diagram {
        padding: 1px 0 0;
    }

    .diagram img {
        width: 100%;
        max-width: 445px;
        height: auto;
        margin-left: -20px;
    }


    /* Information */

    .info {
        margin: 3px 6px;
        padding: 6px 10px;

        font-size: 11px;
        line-height: 1.24;
    }


    /* Ladda ner */

    .download-data {
        height: 29px;
        flex: 0 0 29px;

        margin: 0 6px 2px;
        padding: 3px 4px;
    }

    .download-title {
        font-size: 11px;
    }

    .download-button {
        min-width: 37px;
        height: 22px;
        padding: 0 3px;
        font-size: 11px;
    }


    /* Fler trender */

    .trends {
        height: 29px;
        flex: 0 0 29px;

        margin: 0 6px 2px;
        padding: 3px 4px;
    }

    .trend-title {
        font-size: 11px;
    }

    .parameter-button {
        min-width: 37px;
        height: 22px;
        padding: 0 3px;
        font-size: 11px;
    }


    /* Nedre navigation */

    .navigation {
        height: 30px;
        flex: 0 0 30px;
    }

    .navigation a {
        height: 30px;
        padding: 1px 6px;
    }

    .location-icon {
        width: 19px;
        min-width: 19px;
        margin-right: 3px;
        transform: scale(0.60);
    }

    .nav-text {
        font-size: 11px;
    }

    .nav-arrow {
        font-size: 17px;
    }
}


/* ---------------------------------------------------------
   16. TILLGÄNGLIGHET – MINSKAD RÖRELSE
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
