/* Hookpid state navigation and account buttons */
.header-states {
    position: relative;
}

.header-states > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: .94rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.header-states > summary::-webkit-details-marker {
    display: none;
}

.header-states > summary:hover,
.header-states[open] > summary {
    color: var(--accent);
}

.header-states > summary i {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
}

.header-states[open] > summary i {
    transform: translateY(2px) rotate(225deg);
}

.header-states-panel {
    position: absolute;
    top: calc(100% + 22px);
    right: 0;
    z-index: 80;
    width: min(570px, 82vw);
    padding: 20px;
    border: 1px solid rgba(29, 29, 32, .11);
    border-radius: 18px;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 24px 65px rgba(28, 22, 25, .16);
}

.header-states-panel::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 28px;
    width: 15px;
    height: 15px;
    border-top: 1px solid rgba(29, 29, 32, .11);
    border-left: 1px solid rgba(29, 29, 32, .11);
    background: #fff;
    transform: rotate(45deg);
}

.header-states-heading {
    display: grid;
    gap: 2px;
    padding: 2px 4px 14px;
    border-bottom: 1px solid var(--line);
}

.header-states-heading strong {
    color: var(--ink);
    font-size: 1rem;
}

.header-states-heading small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 500;
}

.header-state-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: 330px;
    padding: 13px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.header-state-links a,
.header-all-listings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 9px;
    padding: 10px 11px;
    color: #39363a;
    text-decoration: none;
    font-size: .86rem;
    font-weight: 700;
    transition:
        color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.header-state-links a b,
.header-all-listings b {
    color: var(--accent);
    transition: transform .18s ease;
}

.header-state-links a:hover,
.header-state-links a:focus-visible {
    color: var(--accent);
    background: #fff2f6;
    transform: translateX(2px);
}

.header-state-links a:hover b,
.header-state-links a:focus-visible b,
.header-all-listings:hover b,
.header-all-listings:focus-visible b {
    transform: translateX(3px);
}

.header-all-listings {
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    padding-top: 14px;
    color: var(--accent);
}

.account-actions .sign-in {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid rgba(156, 41, 79, .38);
    border-radius: 7px;
    color: var(--accent);
    background: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 750;
    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.account-actions .sign-in:hover,
.account-actions .sign-in:focus-visible {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: #fff4f7;
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .header-panel {
        max-height: calc(100vh - 68px);
        max-height: calc(100dvh - 68px);
        padding: 18px 22px 22px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .primary-nav {
        gap: 2px;
    }

    .primary-nav > a {
        padding: 9px 6px;
    }

    .header-states {
        width: 100%;
    }

    .header-states > summary {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 10px 6px;
    }

    .header-states-panel {
        position: static;
        width: 100%;
        margin: 3px 0 8px;
        padding: 10px;
        border-radius: 11px;
        background: #f8f6f7;
        box-shadow: none;
    }

    .header-states-panel::before,
    .header-states-heading {
        display: none;
    }

    .header-state-links {
        grid-template-columns: 1fr;
        gap: 3px;
        max-height: 240px;
        padding: 0 2px 7px;
    }

    .header-state-links a {
        padding: 9px 10px;
        background: #fff;
        font-size: .84rem;
    }

    .header-all-listings {
        margin-top: 3px;
        padding: 11px 9px 4px;
    }

    .account-actions {
        gap: 9px;
        margin-top: 13px;
        padding-top: 15px;
        border-top: 1px solid var(--line);
    }

    .account-actions .sign-in,
    .account-actions .sign-up {
        width: 100%;
        min-height: 48px;
        margin: 0;
    }
}