/*
 * The shared header and footer (resources/views/partials/site/).
 * Plain CSS with its own reset, so it looks the same on grading (Tailwind 3),
 * auction (Tailwind 4) and shop (Bootstrap) pages. Colours follow the shop
 * and auction theme.
 */
.site-header,
.site-footer {
    --site-bg: #0f1626;
    --site-surface: #172036;
    --site-line: rgba(255, 255, 255, 0.08);
    --site-line-strong: rgba(255, 255, 255, 0.18);
    --site-text: #f4f4f5;
    --site-muted: #a1a1aa;
    --site-accent: #7dd3fc;
    --site-accent-hover: #bae6fd;
    --site-on-accent: #0b1220;
    font-family: 'Figtree', 'Apple SD Gothic Neo', 'Malgun Gothic', ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: var(--site-text);
    text-align: left;
}

.site-header *,
.site-footer *,
.site-subnav * {
    box-sizing: border-box;
    font-family: inherit;
    letter-spacing: inherit;
}

.site-brand span {
    font-weight: 700;
}

.site-header a,
.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-header img,
.site-footer img {
    display: block;
    max-width: none;
}

/* Header */

.site-header {
    position: relative;
    z-index: 50;
    background: var(--site-bg);
    border-bottom: 1px solid var(--site-line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 16px;
    min-height: 64px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.site-brand img {
    width: 26px;
    height: auto;
}

.site-sections {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.site-sections a {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--site-muted);
    font-weight: 600;
}

.site-sections a:hover,
.site-sections a:focus-visible {
    color: var(--site-text);
    background: rgba(255, 255, 255, 0.06);
}

.site-sections a.is-active {
    color: var(--site-text);
    background: rgba(125, 211, 252, 0.14);
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.35);
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.site-lang,
.site-login {
    color: var(--site-muted);
    font-weight: 600;
}

.site-lang:hover,
.site-login:hover {
    color: var(--site-text);
}

.site-button {
    padding: 7px 14px;
    border-radius: 6px;
    background: var(--site-accent);
    color: var(--site-on-accent) !important;
    font-weight: 700;
}

.site-button:hover {
    background: var(--site-accent-hover);
}

.site-account {
    position: relative;
}

.site-account summary {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--site-line-strong);
}

.site-account summary::-webkit-details-marker {
    display: none;
}

.site-account summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.7;
}

.site-account__name {
    max-width: 14ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 240px;
    padding: 6px;
    background: var(--site-surface);
    border: 1px solid var(--site-line-strong);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.site-menu a,
.site-menu button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--site-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.site-menu a:hover,
.site-menu button:hover,
.site-menu a:focus-visible,
.site-menu button:focus-visible {
    background: rgba(255, 255, 255, 0.07);
}

.site-menu form {
    margin: 4px 0 0;
    padding-top: 4px;
    border-top: 1px solid var(--site-line);
}

.site-menu__heading {
    margin: 6px 0 0;
    padding: 8px 10px 4px;
    border-top: 1px solid var(--site-line);
    color: var(--site-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Phones: brand and account on the first row, the site tabs below. */
@media (max-width: 640px) {
    .site-header__inner {
        gap: 10px 12px;
    }

    .site-brand span {
        display: none;
    }

    .site-sections {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }

    .site-actions {
        gap: 12px;
    }

    .site-menu {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 64px;
        min-width: 0;
    }
}

/* Footer */

.site-footer {
    margin-top: 48px;
    background: var(--site-bg);
    border-top: 1px solid var(--site-line);
    color: var(--site-muted);
    font-size: 14px;
}

.site-footer__inner {
    display: grid;
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 16px 44px;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer__brand img {
    width: 30px;
    height: auto;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 56px;
}

.site-footer__links div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-footer__links p {
    margin: 0 0 4px;
    color: var(--site-text);
    font-weight: 700;
}

.site-footer__links a:hover,
.site-footer__business a:hover {
    color: var(--site-text);
}

.site-footer__links strong {
    font-weight: 700;
    color: var(--site-text);
}

.site-footer__business {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 13px;
    line-height: 1.6;
}

.site-footer__business a {
    text-decoration: underline;
}

/* A part's own links under the header (grading, auction) */

.site-subnav {
    background: rgba(15, 22, 38, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Figtree', 'Apple SD Gothic Neo', 'Malgun Gothic', ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.site-subnav__inner {
    display: flex;
    gap: 4px 20px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    overflow-x: auto;
}

.site-subnav a {
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    color: #a1a1aa;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-subnav a:hover {
    color: #f4f4f5;
}

.site-subnav a.is-active {
    color: #f4f4f5;
    border-bottom-color: #7dd3fc;
}

/* Grading staff pages: staff tools in place of the public links */

.site-subnav--staff .site-subnav__inner {
    align-items: center;
}

.site-subnav__label {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.12);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-subnav a.site-subnav__end {
    margin-left: auto;
    color: #7dd3fc;
}

.site-subnav a.site-subnav__end:hover {
    color: #bae6fd;
}
