/* ==================================================
   Navigation
   ================================================== */

.site-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link--active {
    color: var(--accent);
}

.nav-link--active::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
}


/* ==================================================
   Sök ort i navigationen
   ================================================== */

.nav-place-search {
    position: relative;
}

.nav-place-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.nav-place-search__input {
    width: 130px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
}

.nav-place-search__input:focus {
    border-color: var(--accent);
    outline: none;
}

.nav-place-search__results {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 6px);
    right: 0;
    width: min(320px, calc(100vw - 24px));
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.nav-place-search__result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.nav-place-search__result:last-child {
    border-bottom: 0;
}

.nav-place-search__result:hover,
.nav-place-search__result:focus-visible {
    background: #f5f7f9;
}

.nav-place-search__name {
    font-size: 0.9rem;
    font-weight: 700;
}

.nav-place-search__meta {
    color: var(--muted);
    font-size: 0.75rem;
}

.nav-place-search__empty {
    padding: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}


/* ==================================================
   Mobilnavigation
   ================================================== */

@media (max-width: 700px) {

    /*
     * Headern får flera rader.
     */
    .site-header__inner {
        display: flex;
        flex-wrap: wrap;
    }


    /*
     * Rad 1:
     * logotypen ensam.
     */
    .brand {
        flex: 0 0 100%;
        width: 100%;
        margin-bottom: 4px;
    }


    /*
     * Navigationen börjar på rad 2
     * och använder hela bredden.
     */
    .site-nav {
        display: flex;
        flex: 0 0 100%;
        width: 100%;
        flex-wrap: wrap;
        gap: 4px 14px;
        align-items: center;
    }


    /*
     * Navigationslänkarna hålls på samma rad
     * så långt utrymmet räcker.
     */
    .nav-link {
        padding: 7px 0;
        font-size: 0.82rem;
    }


    /*
     * Sökfältet får en egen rad under länkarna.
     */
    .nav-place-search {
        flex: 0 0 100%;
        width: 100%;
        margin-top: 5px;
    }

    .nav-place-search__input {
        width: 100%;
    }


    /*
     * Dropdown anpassad till hela sökfältet.
     */
    .nav-place-search__results {
        right: 0;
        left: 0;
        width: 100%;
    }
}


/* ==================================================
   Knappar
   ================================================== */

.near-button,
.load-more {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 750;
}

.near-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #ffffff;
}

.near-button:active {
    background: var(--accent-dark);
}

.filter-button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 650;
}

.load-more {
    margin-top: 4px;
    background: #25282d;
    color: #ffffff;
}


/* ==================================================
   Händelsekort
   ================================================== */

.event-card {
    margin-bottom: 10px;
    padding: 15px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.event-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/*
 * Gemensam flex-layout för kortets topp och footer.
 */
.event-card__header,
.event-card__topline,
.event-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.event-card__header {
    align-items: flex-start;
}

.event-card__topline,
.event-card__footer {
    align-items: center;
}


/* ==================================================
   Händelse-badges
   ================================================== */

.event-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f3f5;
    font-size: 0.76rem;
    font-weight: 800;
}

/*
 * Polis = blå.
 */
.event-badge--police {
    background: #e7f0ff;
}

/*
 * Räddningstjänst = röd/orange.
 */
.event-badge--rescue {
    background: #ffe8e5;
    color: #9f241b;
}
/*
 * Sjöräddning.
 */
.event-badge--sea-rescue {
    background: #dff7f4;
    color: #0f5f59;
}


/* ==================================================
   Händelseinnehåll
   ================================================== */

.event-card__type {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.event-card__title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.event-card__time {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.event-card__location {
    margin: 7px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.event-card__county {
    font-weight: 400;
    opacity: 0.7;
}

.event-card__meta {
    margin: 6px 0 0;
    font-size: 0.875rem;
    opacity: 0.7;
}

/*
 * Hela beskrivningen ska visas.
 * Ingen line-clamp eller textkapning.
 */
.event-card__description {
    display: block;
    margin: 10px 0 0;
    max-height: none;
    overflow: visible;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    text-overflow: unset;
    white-space: normal;
}


/* ==================================================
   Händelse-footer
   ================================================== */

.event-card__footer {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #eff1f3;
    font-size: 0.82rem;
}

.event-card__source {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.event-card__source-link,
.event-card__more {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.event-card__source-link:hover,
.event-card__source-link:focus-visible {
    text-decoration: underline;
}


/* ==================================================
   Ortssida - filterknappar
   ================================================== */

.location-header__filters {
    margin-top: 14px;
    margin-bottom: 18px;
}

.location-header__filters .filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


/* ==================================================
   Populära orter på startsidan
   ================================================== */

.home-locations {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.home-locations h2 {
    margin: 0;
    font-size: 1.25rem;
}

.home-locations p {
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.home-locations__links {
    display: grid;
    gap: 8px;
}

.home-locations__links a {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 650;
    text-decoration: none;
}

.home-locations__links a:hover,
.home-locations__links a:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}


/* ==================================================
   Visa fler
   ================================================== */

.load-more-wrap {
    margin-top: 16px;
}

.load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


/* ==================================================
   Nära mig-filter
   ================================================== */

.near-filters {
    display: grid;
    gap: 12px;
    margin: 16px 0 20px;
}

.near-filter {
    display: grid;
    gap: 6px;
}

.near-filter label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.near-filter select {
    width: 100%;
    min-height: 46px;
    padding: 0 42px 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    cursor: pointer;
}

.near-filter select:focus {
    border-color: var(--accent);
    outline: 2px solid transparent;
}

/*
 * På större skärmar ligger radie och tidsperiod
 * bredvid varandra.
 */
@media (min-width: 640px) {
    .near-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ==================================================
   Lokal sökning bland visade händelser
   ================================================== */

.event-search-wrap {
    margin: 12px 0 16px;
}

.event-search-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.event-search {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.event-search:focus {
    border-color: var(--accent);
    outline: none;
}


/* ==================================================
   Hover-effekter för enheter som faktiskt har hover
   ================================================== */

@media (hover: hover) {
    .event-card__link:hover {
        background: #fcfcfd;
    }
}


/* ==================================================
   FAQ
   ================================================== */

.faq-hero {
    margin-bottom: 24px;
}

.faq-hero h1 {
    margin-bottom: 8px;
}

.faq-hero__intro {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-section {
    margin-top: 20px;
}

.faq-section > h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.faq-list {
    display: grid;
    gap: 9px;
}

/*
 * Varje FAQ-fråga använder native <details>.
 */
.faq-item {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.faq-item__question {
    position: relative;
    padding: 15px 48px 15px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.4;
    list-style: none;
}

/*
 * Dölj webbläsarens standardpil.
 */
.faq-item__question::-webkit-details-marker {
    display: none;
}

/*
 * Egen pil till höger.
 */
.faq-item__question::after {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    content: "";
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.18s ease;
}

/*
 * Vänd pilen när frågan är öppen.
 */
.faq-item[open] .faq-item__question::after {
    transform: translateY(-30%) rotate(225deg);
}

.faq-item__question:hover {
    background: #fafbfc;
}

.faq-item__question:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.faq-item__answer {
    padding: 0 15px 15px;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.6;
}

.faq-item__answer p {
    margin: 0 0 10px;
}

.faq-item__answer p:last-child {
    margin-bottom: 0;
}

.faq-item__answer ul {
    margin: 8px 0 12px;
    padding-left: 21px;
}

.faq-item__answer li {
    margin-bottom: 5px;
}


/* ==================================================
   FAQ - avslutande informationsblock
   ================================================== */

.faq-about {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.faq-about h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.faq-about p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* ==================================================
   Footer
   ================================================== */

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.site-footer__inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

.site-footer__content {
    display: grid;
    gap: 20px;
}

.site-footer__about {
    max-width: 520px;
}

.site-footer__brand {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.site-footer__about p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.site-footer__nav a {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.site-footer__bottom {
    display: grid;
    gap: 6px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.site-footer__bottom p {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

@media (min-width: 700px) {
    .site-footer__content {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .site-footer__nav {
        justify-content: flex-end;
    }

    .site-footer__bottom {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }

    .site-footer__bottom p:last-child {
        text-align: right;
    }
}
/* ==================================================
   Statistik
   ================================================== */

.statistics-hero {
    margin-bottom: 24px;
}

.statistics-hero h1 {
    margin-bottom: 8px;
}

.statistics-hero__intro {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* ==================================================
   Statistik - sammanfattningskort
   ================================================== */

.statistics-summary {
    margin-top: 24px;
}

.statistics-section-title {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.statistics-cards {
    display: grid;
    gap: 10px;
}

.statistics-card {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.statistics-card__label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.statistics-card__value {
    font-size: 1.7rem;
    line-height: 1.1;
}

.statistics-card__meta {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
}


/* ==================================================
   Statistik - sektioner
   ================================================== */

.statistics-section {
    margin-top: 32px;
}

.statistics-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.statistics-section__header h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.statistics-section__eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.statistics-section__intro {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.statistics-period {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f3f5;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 750;
    white-space: nowrap;
}


/* ==================================================
   Statistik - topplistor
   ================================================== */

.statistics-ranking {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.statistics-ranking__row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
}

.statistics-ranking__row:last-child {
    border-bottom: 0;
}

.statistics-ranking__position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f3f5;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.statistics-ranking__name {
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
}

.statistics-ranking__name--wide {
    grid-column: 1 / 3;
}

.statistics-ranking__count {
    font-size: 0.95rem;
    white-space: nowrap;
}

.statistics-empty {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.9rem;
}


/* ==================================================
   Statistik - informationsruta
   ================================================== */

.statistics-disclaimer {
    margin-top: 36px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbfc;
}

.statistics-disclaimer h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.statistics-disclaimer p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.statistics-disclaimer p:last-child {
    margin-bottom: 0;
}

/* ==================================================
   Statistik per ort
   ================================================== */

.statistics-place__meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.statistics-back-link {
    margin: 28px 0 0;
}

.statistics-back-link a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.statistics-back-link a:hover,
.statistics-back-link a:focus-visible {
    text-decoration: underline;
}
/* ==================================================
   Statistik - ortssök med autofill
   ================================================== */

.statistics-place-search {
    margin-top: 32px;
}

.statistics-place-autocomplete {
    position: relative;
}

.statistics-place-autocomplete__results {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.statistics-place-autocomplete__result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.statistics-place-autocomplete__result:last-child {
    border-bottom: 0;
}

.statistics-place-autocomplete__result:hover,
.statistics-place-autocomplete__result:focus-visible {
    background: #f5f7f9;
}

.statistics-place-autocomplete__name {
    font-size: 0.9rem;
    font-weight: 700;
}

.statistics-place-autocomplete__meta {
    color: var(--muted);
    font-size: 0.75rem;
}

.statistics-place-autocomplete__empty {
    padding: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ==================================================
   Statistik - större skärmar
   ================================================== */

@media (min-width: 700px) {
    .statistics-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==================================================
   Sidåtgärder
   ================================================== */

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px;
}


/* Dela-knapp */

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.share-button:hover,
.share-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.share-button:active {
    transform: translateY(1px);
}

/*
 * Visas tillfälligt när länken har
 * kopierats på en enhet utan native share.
 */
.share-button--copied {
    border-color: var(--accent);
    color: var(--accent);
}


/* Länk bredvid dela-knappen */

.page-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.page-action-link:hover,
.page-action-link:focus-visible {
    text-decoration: underline;
}
/* ========================================
   Admin – source health
   ======================================== */

.admin-health-page {
    margin: 0;
    background: #f5f7fa;
    color: #18202a;
}

.admin-health {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 80px;
}

.admin-health__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.admin-health__header h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 5vw, 3rem);
}

.admin-health__header p {
    margin: 0;
}

.admin-health__eyebrow {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}

.admin-health__updated {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.78rem;
    text-align: right;
    opacity: 0.7;
}


/* Summering */

.admin-health-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.admin-health-summary__card {
    padding: 20px;
    border: 1px solid #dfe4ea;
    border-radius: 14px;
    background: #fff;
}

.admin-health-summary__card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.8rem;
}

.admin-health-summary__card span {
    font-size: 0.85rem;
    font-weight: 700;
}

.admin-health-summary__card--ok {
    border-left: 5px solid #24864b;
}

.admin-health-summary__card--warning {
    border-left: 5px solid #d49400;
}

.admin-health-summary__card--error {
    border-left: 5px solid #c9382d;
}


/* Källor */

.admin-health-sources {
    display: grid;
    gap: 14px;
}

.admin-health-source {
    padding: 22px;
    border: 1px solid #dfe4ea;
    border-left-width: 5px;
    border-radius: 14px;
    background: #fff;
}

.admin-health-source--ok {
    border-left-color: #24864b;
}

.admin-health-source--warning {
    border-left-color: #d49400;
}

.admin-health-source--error {
    border-left-color: #c9382d;
}

.admin-health-source--unknown {
    border-left-color: #77808c;
}

.admin-health-source__top {
    margin-bottom: 20px;
}

.admin-health-source__top > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-health-source h2 {
    margin: 0;
    font-size: 1.1rem;
}


/* Status */

.admin-health-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-health-status--ok {
    background: #e5f5eb;
    color: #176535;
}

.admin-health-status--warning {
    background: #fff3d5;
    color: #875d00;
}

.admin-health-status--error {
    background: #ffe7e5;
    color: #9f241b;
}

.admin-health-status--unknown {
    background: #edf0f3;
    color: #555f6a;
}


/* Detaljer */

.admin-health-source__details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
}

.admin-health-source__details div {
    min-width: 0;
}

.admin-health-source__details dt {
    margin-bottom: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.6;
}

.admin-health-source__details dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.admin-health-source__details small {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.55;
}


/* Felmeddelande */

.admin-health-source__message {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 9px;
    background: #f5f7fa;
    font-size: 0.82rem;
}

.admin-health-source__message strong {
    display: block;
    margin-bottom: 4px;
}

.admin-health-source__message p {
    margin: 0;
}


/* Tom */

.admin-health-empty {
    padding: 30px;
    border: 1px solid #dfe4ea;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}


/* Mobil */

@media (max-width: 750px) {

    .admin-health {
        width: min(100% - 24px, 1100px);
        padding-top: 24px;
    }

    .admin-health__header {
        display: block;
    }

    .admin-health__updated {
        margin-top: 14px;
        text-align: left;
    }

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

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

}

@media (max-width: 430px) {

    .admin-health-source__details {
        grid-template-columns: 1fr;
    }

}

/* ================================
   Händelsefilter
   ================================ */

.event-filters {
    display: flex;
    gap: 8px;
    margin: 0 0 20px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.event-filters::-webkit-scrollbar {
    display: none;
}

.event-filter {
    flex: 0 0 auto;
    border: 1px solid #d8dde3;
    border-radius: 999px;
    background: #fff;
    color: #26313d;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.event-filter:hover {
    background: #f4f6f8;
}

.event-filter:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.event-filter.is-active {
    background: #17212b;
    border-color: #17212b;
    color: #fff;
}

.event-filter:disabled {
    cursor: wait;
    opacity: 0.65;
}
.event-filter--police.is-active {
    background: #e7f0ff;
    border-color: #c7d8f5;
    color: #24518a;
}

.event-filter--rescue.is-active {
    background: #ffe8e5;
    border-color: #f2c8c3;
    color: #9f241b;
}

.event-filter--sea-rescue.is-active {
    background: #dff7f4;
    border-color: #b8e7e1;
    color: #0f5f59;
}

.event-filter--all.is-active {
    background: #17212b;
    border-color: #17212b;
    color: #fff;
}
@media (max-width: 600px) {

    .event-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
    }

    .event-filter {
        width: 100%;
        text-align: center;
        white-space: normal;
    }
}


/* ================================
   Tomt filterresultat
   ================================ */

.feed-empty {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e3e7eb;
    border-radius: 12px;
    background: #f7f8f9;
    color: #4b5661;
    text-align: center;
}


/* ================================
   Mobil
   ================================ */

@media (max-width: 600px) {

    .event-filters {
        gap: 7px;
        margin-bottom: 16px;
    }

    .event-filter {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* ==================================================
   Mobil
   ================================================== */

@media (max-width: 520px) {
    .page-actions {
        align-items: stretch;
    }

    .share-button {
        flex-shrink: 0;
    }

    .page-action-link {
        flex: 1;
    }
}
/* ==========================================
   Widget-generator
   ========================================== */

.widget-generator {
    padding: 32px 0 48px;
}

.widget-generator__header {
    max-width: 760px;
    margin-bottom: 32px;
}

.widget-generator__header h1 {
    margin-bottom: 12px;
}

.widget-generator__grid {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.widget-generator__settings,
.widget-generator__preview,
.widget-generator__code,
.widget-generator__info {
    border: 1px solid #e1e5e8;
    border-radius: 14px;
    background: #fff;
    padding: 20px;
}

.widget-generator__settings h2,
.widget-generator__preview h2,
.widget-generator__code h2,
.widget-generator__info h2 {
    margin-top: 0;
}

.widget-generator__field {
    margin-top: 18px;
}

.widget-generator__field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.widget-generator__field input,
.widget-generator__field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #ccd3d9;
    border-radius: 9px;
    padding: 9px 11px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.widget-generator-place {
    position: relative;
}

.widget-generator-place__results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #d8dde2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgb(0 0 0 / 12%);
}

.widget-generator-place__result {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    padding: 10px 12px;
    background: #fff;
    color: #17212b;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.widget-generator-place__result:hover {
    background: #f5f7f8;
}

.widget-generator-place__result span {
    color: #66727c;
    font-size: 0.8rem;
}

.widget-generator-place__empty {
    padding: 12px;
    color: #66727c;
}

.widget-generator__preview-frame {
    overflow: hidden;
    border: 1px solid #e0e4e8;
    border-radius: 12px;
    background: #f6f7f8;
}

.widget-generator__preview iframe {
    display: block;
    width: 100%;
    height: 620px;
    border: 0;
    background: #fff;
}

.widget-generator__code {
    margin-top: 32px;
}

.widget-generator__code textarea {
    width: 100%;
    margin: 10px 0 14px;
    border: 1px solid #ccd3d9;
    border-radius: 9px;
    padding: 14px;
    background: #f6f7f8;
    color: #26313d;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
}

.widget-generator__copy-status {
    min-height: 1.4em;
    margin-bottom: 0;
    color: #4c5964;
    font-size: 0.85rem;
}

.widget-generator__info {
    max-width: 760px;
    margin-top: 32px;
}


@media (max-width: 800px) {

    .widget-generator__grid {
        grid-template-columns: 1fr;
    }

    .widget-generator__preview iframe {
        height: 560px;
    }
}
/* ==========================================
   Blåljuskarta
   ========================================== */

.map-page {
    padding: 32px 0 48px;
}

.map-page__header {
    max-width: 760px;
    margin-bottom: 24px;
}

.map-notice {
    margin-top: 18px;
    border: 1px solid #e1d9b8;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff9df;
    color: #514a2e;
    font-size: 0.9rem;
    line-height: 1.5;
}

.map-location-button {
    margin-bottom: 16px;
}

.event-map {
    width: 100%;
    height: 650px;
    border: 1px solid #dfe4e8;
    border-radius: 14px;
    overflow: hidden;
    background: #edf0f2;
}

.map-page__footnote {
    max-width: 760px;
    margin-top: 14px;
    color: #65717b;
    font-size: 0.82rem;
    line-height: 1.5;
}


/* Markörer */

.map-marker-wrapper {
    background: transparent;
    border: 0;
}

.map-marker {
    display: block;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgb(0 0 0 / 35%);
}

.map-marker--police {
    background: #24518a;
}

.map-marker--rescue {
    background: #9f241b;
}

.map-marker--sea-rescue {
    background: #0f5f59;
}

.map-marker--other {
    background: #56616b;
}


/* Popup */

.map-popup {
    min-width: 180px;
    line-height: 1.4;
}

.map-popup strong {
    display: block;
    margin-bottom: 4px;
}

.map-popup__time {
    margin-top: 5px;
    color: #65717b;
    font-size: 0.8rem;
}

.map-popup__accuracy {
    margin: 7px 0;
    font-size: 0.78rem;
    font-weight: 700;
}

.map-popup a {
    font-weight: 700;
}


@media (max-width: 700px) {

    .event-map {
        height: 520px;
        border-radius: 10px;
    }
}
/* ==================================================
   Grupperade kartmarkörer
   ================================================== */

.map-marker-group {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgb(0 0 0 / 30%);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.map-marker-group--police {
    background: #24518a;
}

.map-marker-group--rescue {
    background: #b8322a;
}

.map-marker-group--sea-rescue {
    background: #0f7770;
}

.map-marker-group--mixed {
    background: #25384a;
}

.map-popup__group-list {
    max-height: 260px;
    margin-top: 10px;
    overflow-y: auto;
}

.map-popup__group-event {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.map-popup__group-event:last-child {
    border-bottom: 0;
}
/* ==================================================
   Information under kartan
   ================================================== */

.map-info {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.map-info h2 {
    margin: 28px 0 10px;
    font-size: 1.25rem;
}

.map-info h2:first-child {
    margin-top: 0;
}

.map-info p {
    max-width: 760px;
    margin: 0 0 14px;
    line-height: 1.65;
}

.map-info__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 22px;
}

.map-info__links a {
    font-weight: 700;
    text-decoration: none;
}

.map-info__links a:hover,
.map-info__links a:focus-visible {
    text-decoration: underline;
}