/* PUBLIC PAGES - the start page, Funktioner, Roadmap, the legal pages and the login page (_LayoutUnauthenticated).
   Built on the tokens of site.css (--app-bg, --box-*) and the boxes of the signed in part, only with more air.
   The colour of a module card is the colour of its menu section (MenuSections), set as --box-accent */

body.public {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--app-bg);
}

.public-skip:focus {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 1100;
    padding: .5rem 1rem;
    background: #fff;
    border-radius: var(--box-radius);
    box-shadow: var(--box-shadow);
}

.public :focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* HEADER - the same white row as the signed in part */
.public-header {
    background: #fff;
    border-bottom: 1px solid var(--box-border);
    box-shadow: var(--box-shadow);

    .navbar {
        padding-top: .75rem;
        padding-bottom: .75rem;
    }

    .nav-link {
        color: #1c1c1c;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .nav-link:hover {
        color: #0d6efd;
    }

    .nav-link.active {
        color: #0d6efd;
        font-weight: 600;
    }
}

.public-brand {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-weight: 600;
    color: #1c1c1c;
}

.public-main {
    flex-grow: 1;
}

/* HERO - the logo, one sentence and the actions on the right */
.public-hero {
    background: #fff;
    border-bottom: 1px solid var(--box-border);
    padding: 3rem 0;

    .public-hero-logo {
        width: 100%;
        max-width: 22rem;
        height: auto;
    }

    h1 {
        font-weight: 700;
        letter-spacing: -.01em;
    }

    .lead {
        max-width: 38rem;
        color: #3f4650;
    }
}

@media (min-width: 992px) {
    .public-hero {
        padding: 5rem 0;
    }
}

/* the heading of an inner page, e.g. Funktioner */
.public-page-header {
    background: #fff;
    border-bottom: 1px solid var(--box-border);
    padding: 2.5rem 0 2rem;

    .lead {
        max-width: 42rem;
        color: #3f4650;
        margin-bottom: 0;
    }
}

.public-section {
    padding: 3rem 0;

    > .container > h2 {
        margin-bottom: 1.5rem;
    }
}

.public-section-alt {
    background: #fff;
    border-top: 1px solid var(--box-border);
    border-bottom: 1px solid var(--box-border);
}

/* CARDS - a .box.box-accent with an icon in the colour of its menu section */
.public-card {
    height: 100%;
    margin-bottom: 0;

    /* the icon and the heading side by side, .box > header puts actions to the right */
    > header {
        justify-content: flex-start;
        gap: .75rem;
    }

    > header > :is(h2, h3) {
        border-left: 0;
        padding-left: 0;
        margin: 0;
        font-size: 1.125rem;
    }

    ul {
        padding-left: 1.125rem;
        margin-bottom: 0;
    }

    li + li {
        margin-top: .25rem;
    }
}

.public-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--box-radius);
    font-size: 1.25rem;
    color: var(--box-accent, #0d6efd);
    background: color-mix(in srgb, var(--box-accent, #0d6efd) 12%, #fff);
}

/* ROADMAP - status as icon and word, like Att göra on the dashboards */
.roadmap-column > h2 {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.25rem;
}

.roadmap-item {
    h3 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: .25rem;
    }

    p {
        margin-bottom: 0;
        color: #3f4650;
    }
}

/* alone in a grid column, e.g. På väg on the start page: as tall as its neighbours */
.row > [class*="col"] > .roadmap-item:only-child {
    height: 100%;
    margin-bottom: 0;
}

.roadmap-status-delivered {
    color: #2e7d5b;
}

.roadmap-status-inprogress {
    color: #b26a00;
}

.roadmap-status-planned {
    color: #5b6b7f;
}

/* PROSE - the legal pages and Om, one narrow column that is easy to read */
.public-prose {
    max-width: 46rem;

    h2 {
        font-size: 1.375rem;
        margin-top: 2rem;
        scroll-margin-top: 1rem;
    }

    h3 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
    }

    .public-updated {
        color: #5b6b7f;
    }
}

.public-toc ol {
    margin-bottom: 0;
}

/* FOOTER */
.public-footer {
    background: #fff;
    border-top: 1px solid var(--box-border);
    padding: 2.5rem 0 1.5rem;
    font-size: .9375rem;
    color: #3f4650;

    h2 {
        font-size: .8125rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #5b6b7f;
        margin-bottom: .75rem;
    }

    ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    li + li {
        margin-top: .375rem;
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    a:hover {
        color: #0d6efd;
        text-decoration: underline;
    }
}

.public-footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    color: #1c1c1c;
}

.public-footer-bottom {
    border-top: 1px solid var(--box-border);
    margin: 2rem 0 0;
    padding-top: 1.25rem;
    font-size: .875rem;
    color: #5b6b7f;
}

.public-login {
    padding-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
    .public .collapsing {
        transition: none;
    }
}
