/* The end of a blog post's reading area: Prev / Next within the category, and the sticky offer bar
   (resources/views/central/blog/partials/{adjacent,promo-bar}.blade.php). Every colour is a --h-*
   token from landing-home.css (on .landing-v2). The bar's button is the site's .h-button. */

/* ── Prev / Next ────────────────────────────────────────────────────────────────────────────── */
.br-adj {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--h-line);
}
.br-adj__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--h-ink);
    text-decoration: none;
}
.br-adj__link--next { justify-content: flex-end; text-align: end; grid-column: 2; }
.br-adj__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.br-adj__label { font-size: 14px; line-height: 20px; color: var(--h-text); }
.br-adj__title {
    overflow: hidden;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: var(--h-700);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.br-adj__chev { flex: none; font-size: 22px; color: var(--h-600); }
.br-adj__link:hover .br-adj__title { text-decoration: underline; }
.br-adj__link:focus-visible { outline: 2px solid var(--h-600); outline-offset: 4px; border-radius: 6px; }
[dir="rtl"] .br-adj__chev { transform: scaleX(-1); }

@media (max-width: 767px) {
    .br-adj { gap: 16px; margin-top: 36px; }
    .br-adj__title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal;
        font-size: 15px;
        line-height: 22px;
    }
    .br-adj__chev { font-size: 18px; }
}

/* ── The sticky offer bar ───────────────────────────────────────────────────────────────────── */
.br-promo-end { display: block; height: 1px; }
.br-promo {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 900;
    max-width: 1100px;
    margin-inline: auto;
    border-radius: 999px;
    background: linear-gradient(100deg, var(--h-950) 0%, var(--h-800) 55%, var(--h-700) 100%);
    box-shadow: 0 18px 40px -16px rgb(21 30 49 / 0.55);
    color: var(--h-on-dark);
    transition: transform 0.35s cubic-bezier(0.2, 0.75, 0.25, 1), opacity 0.25s ease;
}
.br-promo.is-gone { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.br-promo__in {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 66px;
    padding: 8px 10px 8px 24px;
}
.br-promo__logo { flex: none; display: block; height: 32px; width: auto; }

.br-promo__run {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    direction: ltr;    /* the track slides left in every language (§6d); each message keeps its own direction */
    -webkit-mask-image: linear-gradient(90deg, transparent, currentColor 6%, currentColor 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, currentColor 6%, currentColor 94%, transparent);
}
.br-promo__track { display: flex; width: max-content; animation: br-run 30s linear infinite; }
.br-promo__half { display: flex; flex: none; }
.br-promo__msg {
    flex: none;
    padding-right: 64px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--h-on-dark);
}
.br-promo:hover .br-promo__track { animation-play-state: paused; }
@keyframes br-run { to { transform: translateX(-50%); } }

/* The button sits in the bar's middle; its line hangs below it, out of the layout (Rio: "the word
   no card need let it be smaller to keep the button middle") */
.br-promo__cta { position: relative; flex: none; display: flex; align-items: center; }
.br-promo__note {
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    line-height: 12px;
    color: var(--h-on-dark-text);
    white-space: nowrap;
}
.br-promo__mark { display: none; flex: none; width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
    .br-promo { transition: opacity 0.2s ease; }
    .br-promo.is-gone { transform: none; }
    .br-promo__track { animation: none; width: auto; }
    .br-promo__half[aria-hidden="true"], .br-promo__msg[aria-hidden="true"] { display: none; }
    .br-promo__half { min-width: 0; }
    .br-promo__msg { overflow: hidden; text-overflow: ellipsis; padding-right: 0; }
    .br-promo__run { -webkit-mask-image: none; mask-image: none; }
}

@media (max-width: 767px) {
    .br-promo { left: 8px; right: 8px; bottom: 8px; border-radius: 22px; }
    .br-promo__in { gap: 10px; min-height: 68px; padding: 7px 8px 7px 12px; }
    .br-promo__logo { height: 24px; }
    .br-promo__in--mark .br-promo__logo { display: none; }
    .br-promo__in--mark .br-promo__mark { display: block; }
    .br-promo__msg { font-size: 14.5px; line-height: 20px; padding-right: 40px; }
    .br-promo__note { font-size: 9.5px; line-height: 11px; }
}
