/* Hub-only navigation and its search return link. No changes to search filters. */
.hzp-hub-refinement {
    display: grid;
    gap: 14px;
    margin-block: 4px 24px;
    padding-block: 18px;
    border-block: 1px solid var(--hzp-line, #e3e6ec);
}

.hzp-hub-refinement__group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.hzp-hub-refinement__label {
    min-inline-size: 100px;
    color: var(--hzp-muted, #596273);
    font-size: 14px;
    font-weight: 600;
}

.hzp-hub-refinement__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hzp-hub-refinement__link,
.hzp-hub-refine,
.hzp-hub-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-block-size: 44px;
    padding: 10px 16px;
    border: 1px solid var(--hzp-line, #d8dce5);
    border-radius: 8px;
    color: var(--hzp-ink, #1c2434);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
}

.hzp-hub-refinement__link:hover,
.hzp-hub-back-link:hover {
    border-color: var(--hzp-accent, #0745d9);
    color: var(--hzp-accent, #0745d9);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hzp-hub-refinement__link[aria-current="page"] {
    border-color: var(--hzp-accent, #0745d9);
    color: var(--hzp-accent, #0745d9);
    background: #edf3ff;
    font-weight: 750;
}

.hzp-hub-refine-action {
    flex-shrink: 0;
    margin-inline-start: auto;
}

.hzp-hub-refine {
    min-inline-size: 150px;
    border-color: var(--hzp-accent, #0745d9);
    color: #fff;
    background: var(--hzp-accent, #0745d9);
}

.hzp-hub-refine:hover {
    color: #fff;
    background: #0639b5;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hzp-hub-refine svg {
    inline-size: 20px;
    block-size: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.hzp-hub-refinement__link:focus-visible,
.hzp-hub-refine:focus-visible,
.hzp-hub-back-link:focus-visible {
    outline: 3px solid #0745d9;
    outline-offset: 3px;
}

.hzp-hub-back-link {
    justify-content: flex-start;
    margin-block-end: 12px;
    padding-inline: 0;
    border: 0;
    color: var(--hzp-accent, #0745d9);
    background: transparent;
    text-align: start;
}

@media (max-width: 767px) {
    /* Reserve room after the footer too, so its final links can scroll above
       the fixed action. A main-only spacer would leave those links covered. */
    body:has(.hzp-hub-refinable) {
        padding-block-end: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    html:has(.hzp-hub-refinable) {
        scroll-padding-block-end: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .hzp-hub-refinement__group {
        align-items: flex-start;
        flex-direction: column;
    }

    .hzp-hub-refine-action {
        position: fixed;
        z-index: 50;
        inset-inline: 0;
        inset-block-end: 0;
        margin: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        border-block-start: 1px solid var(--hzp-line, #e3e6ec);
        background: #fff;
        box-shadow: 0 -3px 16px rgb(28 36 52 / 8%);
    }

    .hzp-hub-refine {
        inline-size: 100%;
        min-block-size: 48px;
    }
}
