:root {
    --sikker-topp: env(safe-area-inset-top);
    --bunn-hoyde: 3.25rem;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
}

body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: calc(var(--bunn-hoyde) + env(safe-area-inset-bottom) + .5rem);
}

/* Bunnlinja ligger i MainLayout og vises på alle sider, slik at versjonsnummeret alltid er
   synlig på mobilen og Oppsett alltid er ett trykk unna. */
.app-bunn {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    height: calc(var(--bunn-hoyde) + env(safe-area-inset-bottom));
    padding: 0 1rem env(safe-area-inset-bottom) 1rem;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid #e3e3e3;
}

.app-bunn-versjon {
    font-size: .8rem;
    color: #6c757d;
}

/* Bunnark for «Ny alarm» og for utløst alarm. Ligger over kartet, derfor global CSS
   (scoped CSS fra en side når ikke elementer som rendres utenfor sidens rot). */
.ark-bakgrunn {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1500;
}

.ark {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1600;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)) 1rem;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
    max-height: 85dvh;
    overflow-y: auto;
}

.ark-knapper {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
}

.ark-knapper .btn {
    flex: 1;
    padding: .75rem 1rem;
}

.liste-topp {
    display: flex;
    gap: .5rem;
}

.alarm-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alarm-rad {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid #e6e6e6;
}

.alarm-rad-tekst {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.alarm-rad-tittel {
    font-weight: 600;
    text-decoration: none;
}

.alarm-rad-detalj {
    font-size: .85rem;
    color: #666;
}

.snarvei-steg li {
    margin-bottom: .5rem;
    font-size: .9rem;
    line-height: 1.4;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Det oppstod en feil."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #8c1d18;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Laster");
    }

.oppsett-forklaring {
    color: #495057;
    font-size: 0.95rem;
}

.oppsett-status {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin: 1rem 0;
}

.oppsett-ok {
    color: #17632a;
    font-weight: 600;
}

.oppsett-mangler {
    color: #8c1d18;
    font-weight: 600;
}

.oppsett-feil {
    color: #8c1d18;
    font-size: 0.95rem;
}

.oppsett-url {
    background-color: #f1f3f5;
    border-radius: 0.4rem;
    display: block;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
    padding: 0.6rem 0.7rem;
}

.snarvei-reserve summary {
    color: #495057;
    cursor: pointer;
    font-size: 0.95rem;
}
