/* FrontStore placeholder styling. The public theme is a later piece of work. */
:root {
    color-scheme: light;
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

body {
    margin: 0;
    background: #f7f7f8;
    color: #1f2430;
}

.placeholder {
    max-width: 40rem;
    margin: 6rem auto;
    padding: 0 1.5rem;
}

.placeholder h1 {
    margin-bottom: .5rem;
    font-size: 2rem;
}

.placeholder a {
    color: #d97706;
}

/*
 * Navigation menus.
 *
 * Submenus open on hover and on focus-within, with no script involved. A menu that needs
 * JavaScript to open is a menu that is missing on the first paint and gone entirely when a bundle
 * fails to load — and this one is on every page of the site.
 */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.site-header-inner,
.site-footer-inner {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-header-inner {
    min-height: 3.5rem;
}

.site-brand {
    font-weight: 600;
    font-size: 1.125rem;
    color: #1f2430;
    text-decoration: none;
}

.menu-list,
.menu-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .menu-list {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .5rem .75rem;
    color: #374151;
    text-decoration: none;
    border-radius: .375rem;
    font-size: .9375rem;
    cursor: pointer;
}

.menu-link:hover,
.menu-link:focus-visible {
    background: #f3f4f6;
    color: #b45309;
}

/* The caret marks which entries open something, so a grouping label is not mistaken for a
   link that does nothing when clicked. */
.site-nav .menu-item.has-children > .menu-link::after {
    content: "";
    width: .3rem;
    height: .3rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-.1rem);
}

.site-nav .menu-sublist {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .25rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    z-index: 20;

    /* Hidden with visibility rather than display:none so that the submenu is still in the
       accessibility tree and focus-within can reveal it when a keyboard user tabs in. */
    visibility: hidden;
    opacity: 0;
}

.site-nav .menu-item:hover > .menu-sublist,
.site-nav .menu-item:focus-within > .menu-sublist {
    visibility: visible;
    opacity: 1;
}

.site-nav .menu-sublist .menu-link {
    display: flex;
    width: 100%;
}

/* Third-level entries open beside their parent, since there is no room below it. */
.site-nav .menu-sublist .menu-sublist {
    top: -.25rem;
    left: 100%;
}

.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

/* The footer nests by indentation rather than by opening, so every link is reachable without
   hovering anything. */
.site-footer-nav .menu-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

.site-footer-nav .menu-sublist {
    padding-left: .75rem;
}

.site-footer-nav .menu-link {
    padding: .25rem 0;
    font-size: .875rem;
}

@media (max-width: 40rem) {
    .site-header-inner {
        flex-wrap: wrap;
        padding-bottom: .5rem;
    }

    /* Submenus sit inline on a narrow screen: a hover-triggered flyout has no equivalent on a
       touch device, where the first tap would open it and the second would follow the parent. */
    .site-nav .menu-list {
        flex-wrap: wrap;
    }

    .site-nav .menu-sublist {
        position: static;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        border: 0;
        padding-left: .75rem;
    }
}

