.epf-homepage-updates {
    position: sticky;
    top: var(--epf-updates-top, 0px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 24px;
    background: #fffdf0;
    color: #083b4a;
    font-size: 18px;
    line-height: 1.5;
}

.epf-homepage-updates .epf-updates-label {
    flex: 0 0 auto;
    font-weight: 700;
}

.epf-updates-viewport {
    flex: 1 1 0;
    min-width: 0;
    overflow: auto;
    scrollbar-width: none;
}

.epf-updates-viewport::-webkit-scrollbar {
    display: none;
}

.epf-homepage-updates .epf-updates-messages {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    gap: 8px 64px;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    list-style: none;
}

.epf-updates-messages li {
    position: relative;
    min-width: 0;
    overflow-wrap: anywhere;
    list-style: none;
}

.epf-updates-messages li:not(:last-child)::after,
.epf-updates-moving .epf-updates-messages li::after {
    position: absolute;
    top: .75em;
    right: -35px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    transform: translateY(-50%);
}

.epf-homepage-updates a {
    color: #083b4a;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.epf-homepage-updates a:hover {
    color: #000;
    text-decoration-thickness: 2px;
}

.epf-homepage-updates .epf-updates-toggle,
.epf-homepage-updates .epf-updates-hide,
.epf-updates-show {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid #083b4a;
    border-radius: 3px;
    background: #fffdf0;
    color: #083b4a;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.epf-homepage-updates[hidden],
.epf-homepage-updates button[hidden],
.epf-updates-show[hidden] {
    display: none;
}

.epf-updates-show {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1000000;
}

body.admin-bar .epf-updates-show {
    top: 40px;
}

.epf-homepage-updates a:focus-visible,
.epf-homepage-updates button:focus-visible,
.epf-updates-show:focus-visible {
    outline: 3px solid #083b4a;
    outline-offset: 3px;
}

.epf-updates-moving .epf-updates-viewport {
    overflow: hidden;
    padding: 8px;
    margin: -8px 0;
}

.epf-updates-moving .epf-updates-track {
    display: flex;
    width: max-content;
}

.epf-updates-moving .epf-updates-messages {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 64px;
    padding-right: 64px;
    white-space: nowrap;
}

/* Static messages remain on one line and can be scrolled to reach each link. */
.epf-homepage-updates.epf-updates-readable .epf-updates-viewport {
    overflow: auto;
}

@media (max-width: 782px) {
    body.admin-bar .epf-updates-show {
        top: 54px;
    }
}

@media (max-width: 767px) {
    .epf-updates-show {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .epf-homepage-updates {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 12px 16px;
        font-size: 16px;
    }

    .epf-homepage-updates .epf-updates-label {
        flex: 1 1 auto;
    }

    .epf-homepage-updates .epf-updates-viewport {
        order: 3;
        flex-basis: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .epf-updates-show {
        right: 5px;
    }
}

@media (max-width: 1024px) {
    .epf-homepage-updates .epf-updates-label {
        flex: 1 1 auto;
        display: none;
    }

    .epf-updates-show {
        position: absolute;
        top: 4px;
        z-index: 1000000;
    }

    .epf-homepage-updates .epf-updates-toggle,
    .epf-homepage-updates .epf-updates-hide,
    .epf-updates-show {
        flex: 0 0 auto;
        padding: 0 9px;
        border: 1px solid #083b4a;
        border-radius: 3px;
        background: #fffdf0;
        color: #083b4a;
        font: inherit;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
    }
}

@media (max-width: 1024px) and (orientation: portrait), (max-width: 767px) {
    .epf-homepage-updates {
        position: sticky;
        display: flex;
        align-items: center;
        gap: 16px;
        box-sizing: border-box;
        width: 100%;
        padding: 12px 24px;
        background: #fffdf0;
        color: #083b4a;
        font-size: 16px;
        line-height: 1.5;
    }
}
