/* Vindros – grundstil */
#windRoseChart {
    min-height: 300px !important;
    /* background-color: #f4f4f4 !important; */
}

/* Vindros – standardlayout */
.windrose-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 6px;
}
.windrose-chart {
    flex: 1 1 0;
}
.windrose-info {
    width: 260px;
    font-size: 14px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    position: relative;
}
.windrose-info::before {
    content: none;
    display: none;
}
.windrose-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.windrose-legend .item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.windrose-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}
.windrose-calm {
    margin-top: 8px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Vindros – responsiv layout (mobil & smal skärm) */
@media (max-width: 768px) {
    .windrose-wrapper {
        flex-direction: column;
        align-items: center;
        margin-top: 24px;
        margin-bottom: 40px;
        page-break-inside: avoid;
    }

    .chart-container-wind {
        width: 100%;
        max-width: 360px;
    }

    .windrose-chart {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .windrose-chart canvas {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1; /* Behåll cirkelns proportion */
    }

    .windrose-info {
        width: 100%;
        font-size: 11px;
        margin-top: 12px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .windrose-legend {
        flex-direction: row;
        gap: 12px;
        margin-top: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .windrose-calm {
        margin-left: auto;
        margin-top: 0;
        flex-shrink: 0;
    }
}

/* Utskriftsformat */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .windrose-wrapper,
    .chart-container,
    .chart-block {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 30px;
    }

    .windrose-info,
    .windrose-legend {
        display: block !important;
        width: 100% !important;
    }

    h2, h3, .chart-title {
        page-break-after: avoid;
        page-break-inside: avoid;
        margin-top: 20px;
    }

    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .no-print {
        display: none !important;
    }
}

/* Övrig stil för sidhuvud, språkväxling m.m. */
.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-title.no-hamburger {
    padding-top: 8px;
}
.page-title.no-hamburger .lang-switcher {
    margin-right: 10px;
}
.lang-switcher {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.lang-switcher a {
    display: inline-flex;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}
.lang-switcher a:hover {
    transform: translateY(-1px);
}
.lang-switcher a.is-active {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.lang-switcher .fi {
    width: 22px;
    height: 16px;
}

.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 12px;
}
.site-logo img {
    max-height: 64px;
    height: auto;
    width: auto;
}
.site-logo-link {
    display: inline-flex;
    line-height: 0; /* klick-yta = exakt runt loggan */
}

.footer-meta {
    text-align: center;
}
.footer-meta .lang-switcher {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 8px 0 10px;
}

/* Koordinater under rubrik */
.weather-heading .coords {
    display: block;
    font-size: 0.7em;
    color: #666;
    margin-top: 0.15em;
}

/* Tabellrader */
.weather-table tr:nth-child(even) {
    background-color: #f9fcff;
}
.weather-table tr:hover {
    background-color: #eef5fb;
}
.period-selector {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.custom-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.custom-period[hidden] {
    display: none;
}
