.xz-scrolling-notice {
    --xz-notice-row-height: 44px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    /* Match the parent's block-width bulletin in the same widget container. */
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: var(--xz-notice-row-height);
    margin-bottom: 16px;
    margin-inline: 0;
    padding-inline: 5px 4px;
    border: 1px solid var(--main-border-color);
    border-radius: var(--main-radius, 10px);
    background: var(--this-bg, var(--focus-color-opacity1, var(--muted-bg-color)));
    color: var(--this-color, var(--main-color));
}

.xz-scrolling-notice.radius {
    border-radius: 999px;
}

.xz-scrolling-notice__messages {
    flex: 1 1 100px;
    min-width: 0;
    height: var(--xz-notice-row-height);
    overflow: hidden;
}

.xz-scrolling-notice__message[hidden] {
    display: none;
}

.xz-scrolling-notice__message {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 100%;
    min-width: 0;
    color: inherit;
}

.xz-scrolling-notice__track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.xz-scrolling-notice__text {
    display: block;
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xz-scrolling-notice__messages.is-scrolling .xz-scrolling-notice__text {
    width: max-content;
    overflow: visible;
}

.xz-scrolling-notice__icon,
.xz-scrolling-notice__search-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
}

.xz-scrolling-notice__icon:empty {
    visibility: hidden;
}

.xz-scrolling-notice[class*='b-'] .bulletin-icon {
    color: var(--this-bg);
}

.xz-scrolling-notice[class*='jb-'] .bulletin-icon {
    color: var(--this-bg-b);
}

.xz-scrolling-notice__search {
    display: flex;
    /* Keep the idle control close to the icon, short prompt and submit arrow. */
    flex: 0 0 96px;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    min-height: 36px;
    margin: 0;
    margin-inline-start: auto;
    border: 1px solid var(--main-border-color);
    border-radius: 999px;
    background: var(--main-bg-color);
    color: var(--main-color);
}

.xz-scrolling-notice__search:focus-within {
    /* Restore the previous editing width for input and submit-button focus alike. */
    flex-basis: clamp(128px, 24%, 220px);
    border-color: var(--focus-color);
}

.xz-scrolling-notice__search-field {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    align-self: stretch;
    gap: inherit;
    min-width: 0;
    margin: 0;
    padding-inline-start: 7px;
    font-weight: inherit;
    cursor: text;
}

.xz-scrolling-notice__search-icon {
    color: var(--muted-color);
    font-size: 13px;
    pointer-events: none;
}

.xz-scrolling-notice__search .xz-scrolling-notice__input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.xz-scrolling-notice__input::placeholder {
    color: var(--muted-color);
    opacity: 1;
}

.xz-scrolling-notice__input:not(:focus) {
    text-overflow: ellipsis;
}

/* The native clear control reserves input space even while blurred and empty. */
.xz-scrolling-notice__input:not(:focus)::-webkit-search-cancel-button {
    display: none;
}

.xz-scrolling-notice__submit {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--focus-color);
    cursor: pointer;
    touch-action: manipulation;
}

.xz-scrolling-notice__message:focus-visible,
.xz-scrolling-notice__submit:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: -2px;
}

@media (max-width: 767px) {
    .xz-scrolling-notice {
        --xz-notice-row-height: 46px;
        gap: 5px;
        margin-bottom: 12px;
    }

    .xz-scrolling-notice__message {
        gap: 5px;
        font-size: 13px;
    }

    .xz-scrolling-notice__search {
        min-height: 42px;
        gap: 3px;
    }

    .xz-scrolling-notice__search:focus-within {
        flex-basis: clamp(112px, 38%, 164px);
    }

    .xz-scrolling-notice__search .xz-scrolling-notice__input {
        font-size: 16px;
    }
}
