.bivb-newsletters,
.bivb-newsletters *,
.bivb-newsletters *::before,
.bivb-newsletters *::after {
    box-sizing: border-box;
}

.bivb-newsletters {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 1.25em;
    color: var(--bivb-color-text);
    font-family: var(--bivb-font-family-base-stack);
}

.bivb-newsletters__header,
.bivb-newsletters__year,
.bivb-newsletters__empty {
    border-radius: var(--bivb-radius-6);
    background: var(--bivb-color-surface);
}

.bivb-newsletters__header {
    display: flex;
    min-height: 8.4375em;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .625em;
    padding: 1.625em 1.25em;
}

.bivb-newsletters__title {
    margin: 0;
    color: var(--bivb-color-black);
    font-size: 2em;
    font-weight: var(--bivb-font-weight-semibold);
    line-height: 1.1875;
    text-align: center;
    text-wrap: balance;
}

.bivb-newsletters__year-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .625em;
}

.bivb-newsletters__year-link {
    display: inline-flex;
    min-width: 4.375em;
    min-height: 2.1875em;
    align-items: center;
    justify-content: center;
    padding: .625em 1.25em;
    border: 0;
    border-radius: var(--bivb-radius-50);
    background: var(--bivb-color-surface-muted);
    color: var(--bivb-color-black);
    font: inherit;
    font-size: .8125em;
    font-weight: var(--bivb-font-weight-medium);
    line-height: 1.15;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.bivb-newsletters__year-link:hover {
    background: var(--bivb-color-primary);
    color: var(--bivb-color-text-inverse);
}

.bivb-newsletters__filter-button {
    display: none;
}

.bivb-newsletters__years-list {
    display: grid;
    gap: .9375em;
}

.bivb-newsletters__year {
    padding: 1.5625em 3.125em;
    scroll-margin-top: calc(var(--bivb-sticky-offset, 4em) + 1.25em);
}

.bivb-newsletters__year[hidden],
.bivb-newsletters__year-content[hidden] {
    display: none;
}

.bivb-newsletters__year-heading {
    margin: 0;
}

.bivb-newsletters__year-toggle {
    display: flex;
    width: 100%;
    min-height: 1.625em;
    align-items: center;
    justify-content: space-between;
    gap: 1.25em;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bivb-color-black);
    font: inherit;
    font-size: 22px;
    font-weight: var(--bivb-font-weight-semibold);
    line-height: 1.18;
    text-align: left;
    cursor: pointer;
}

.bivb-newsletters__year-chevron {
    width: .625em;
    height: .3125em;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: url("../../assets/img/chevron-down.svg") center / contain no-repeat;
    mask: url("../../assets/img/chevron-down.svg") center / contain no-repeat;
}

.bivb-newsletters.is-motion-ready .bivb-newsletters__year-chevron {
    transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.bivb-newsletters__year-toggle[aria-expanded="true"] .bivb-newsletters__year-chevron {
    transform: rotate(180deg);
}

.bivb-newsletters__year-content {
    display: grid;
    gap: 1.25em;
    margin-top: 1.25em;
}

.bivb-newsletters__year-content.is-opening,
.bivb-newsletters__year-content.is-closing {
    height: var(--bivb-disclosure-height);
    overflow: hidden;
    pointer-events: none;
    transform-origin: top;
    will-change: height, opacity, transform;
}

.bivb-newsletters__year-content.is-opening {
    animation: bivb-newsletters-year-open 240ms cubic-bezier(.22, 1, .36, 1) both;
}

.bivb-newsletters__year-content.is-closing {
    animation: bivb-newsletters-year-close 200ms cubic-bezier(.4, 0, 1, 1) both;
}

@keyframes bivb-newsletters-year-open {
    from {
        height: 0;
        opacity: 0;
        transform: translateY(-.5em);
    }

    to {
        height: var(--bivb-disclosure-height);
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bivb-newsletters-year-close {
    from {
        height: var(--bivb-disclosure-height);
        opacity: 1;
        transform: translateY(0);
    }

    to {
        height: 0;
        opacity: 0;
        transform: translateY(-.375em);
    }
}

.bivb-newsletters__month-heading {
    display: flex;
    align-items: center;
    gap: 1.25em;
    margin-bottom: .625em;
}

.bivb-newsletters__month-heading h3 {
    flex: 0 0 auto;
    margin: 0;
    color: var(--bivb-color-black);
    font-size: 1.125em;
    font-weight: var(--bivb-font-weight-medium);
    line-height: 1.17;
}

.bivb-newsletters__month-heading > span {
    height: 1px;
    flex: 1 1 auto;
    background: var(--bivb-color-border-soft);
}

.bivb-newsletters__items {
    display: grid;
    gap: .625em;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bivb-newsletters__item {
    display: grid;
    min-height: 1.125em;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: .9375em;
}

.bivb-newsletters__meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--bivb-color-surface-disabled);
    font-size: .875em;
    font-variant-numeric: tabular-nums;
    font-weight: var(--bivb-font-weight-regular);
    line-height: 1.15;
    white-space: nowrap;
}

.bivb-newsletters__date {
    padding: 4px 10px;
    border: 1px solid var(--bivb-color-primary);
    border-radius: var(--bivb-radius-6);
    color: var(--bivb-color-primary);
    font-size: 13px;
    font-weight: var(--bivb-font-weight-semibold);
}

.bivb-newsletters__number {
    color: var(--bivb-color-surface-disabled);
    font-size: 14px;
    font-weight: var(--bivb-font-weight-medium);
}

.bivb-newsletters__item-title {
    min-width: 0;
    color: var(--bivb-color-primary);
    font-size: .9375em;
    font-weight: var(--bivb-font-weight-medium);
    line-height: 1.2;
    text-decoration: none;
    text-wrap: pretty;
}

a.bivb-newsletters__item-title:hover,
a.bivb-newsletters__item-title:focus-visible {
    text-decoration: underline;
}

.bivb-newsletters__empty {
    padding: 1.5625em;
    color: var(--bivb-color-text-muted);
    text-align: center;
}

.bivb-newsletters__empty p {
    margin: 0;
}

.bivb-newsletters button:focus-visible,
.bivb-newsletters a:focus-visible {
    outline: var(--bivb-control-focus-width) solid var(--bivb-color-primary);
    outline-offset: var(--bivb-control-focus-offset);
}

/* mobile and tablet */
@media (max-width: 1023px) {
    .bivb-newsletters {
        gap: .625em;
    }

    .bivb-newsletters__header {
        min-height: 5.875em;
        flex-direction: row;
        justify-content: space-between;
        padding: 1.6875em 1.25em;
    }

    .bivb-newsletters__title {
        min-width: 0;
        font-size: 1.5625em;
        line-height: 1.16;
        text-align: left;
    }

    .bivb-newsletters__year-nav {
        display: none;
    }

    .bivb-newsletters__filter-button {
        display: inline-flex;
        width: auto;
        height: 40px;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 17px;
        border: 1px solid var(--bivb-color-input-border);
        border-radius: var(--bivb-radius-6);
        background: var(--bivb-color-surface);
        color: var(--bivb-color-text);
        font: inherit;
        font-size: 15px;
        font-weight: var(--bivb-font-weight-regular);
        line-height: 24px;
        cursor: pointer;
    }

    .bivb-newsletters__filter-button > img {
        display: block;
        width: 14px;
        height: 14px;
        flex: 0 0 14px;
    }

    .bivb-newsletters__years-list {
        gap: .625em;
    }

    .bivb-newsletters__year {
        padding: 1.25em .9375em;
    }

    .bivb-newsletters__item {
        display: flex;
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: .3125em;
    }

    .bivb-newsletters__item-title {
        width: 100%;
        font-size: 1em;
        line-height: 1.2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bivb-newsletters__year-link,
    .bivb-newsletters__year-chevron,
    .bivb-newsletters__year-content.is-opening,
    .bivb-newsletters__year-content.is-closing {
        transition: none;
        animation: none;
        will-change: auto;
    }
}
