/*
 * Ready-made parts every page shares: the header with its Menu on phones, and what a list shows while it's empty.
 * Like foundation.css, everything reads its colours, type and corners from theme.css.
 */

/* ---------- The header: one row on every screen ---------- */

.site-header__inner {
    flex-wrap: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-nav__wide {
    align-items: center;
}

.site-nav__wide .button,
.menu__list .button {
    display: inline-flex;
    align-items: center;
}

/* Menu: a button that opens the links underneath the header. Works without scripts (details and summary). */
.menu {
    display: none;
}

.menu__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    min-height: 44px;
    padding: 0.5em 1em;
    border: max(var(--border-width), 1px) solid color-mix(in srgb, var(--color-text) 25%, transparent);
    border-radius: var(--radius-button);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.menu__button::-webkit-details-marker {
    display: none;
}

/* Three short lines, drawn with borders: "Menu" reads as a menu without an icon file. */
.menu__button::before {
    content: '';
    width: 1em;
    height: 0.75em;
    border-block: 2px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.menu[open] .menu__button {
    background: var(--color-surface);
}

.menu__button:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.menu__list {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: grid;
    gap: var(--space-3xs);
    padding: var(--space-s) var(--gutter) var(--space-m);
    background: var(--color-bg);
    border-bottom: max(var(--border-width), 1px) solid color-mix(in srgb, var(--color-text) 12%, transparent);
    box-shadow: var(--shadow-sm);
    list-style: none;
}

.menu__list a:not(.button) {
    display: block;
    padding: 0.75rem 0;
    font-size: var(--step-1);
    font-weight: 600;
    text-decoration: none;
}

.menu__list a[aria-current='page'] {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 0.16em;
    text-underline-offset: 0.4em;
}

/* Phones and small tablets: the logo and Menu in one row, and the header scrolls away with the page, so the
   content gets the whole screen. */
@media (max-width: 55.99rem) {
    .site-header {
        position: relative;
    }

    .site-header__inner {
        min-height: 3.75rem;
    }

    .site-nav__wide {
        display: none;
    }

    .menu {
        display: block;
    }
}

/* ---------- An empty list: partials/empty.blade.php ---------- */

.empty {
    display: grid;
    justify-items: start;
    gap: var(--space-2xs);
    padding: var(--space-l) var(--space-m);
    border: max(var(--border-width), 1px) dashed color-mix(in srgb, var(--color-text) 22%, transparent);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.empty__title {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    font-size: var(--step-1);
    line-height: 1.2;
}

.empty .button {
    margin-top: var(--space-2xs);
}

/* ---------- Previous and next under a long list: partials/pages.blade.php ---------- */

.pages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    margin-top: var(--space-l);
}

.pages__gap {
    min-width: 6rem;
}
