.br-banner {
    display: block;
    width: 100%;
    margin: 0 0 20px;
}

.br-banner-link {
    display: block;
    text-decoration: none;
    border: 0;
}

.br-banner picture,
.br-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.br-banner img {
    border-radius: var(--rx-media-radius, 14px);
    object-fit: cover;
}

.br-banner a:focus-visible,
.br-stream-ad a:focus-visible,
.br-stream-ad button:focus-visible {
    outline: 3px solid var(--rx-accent, #80ed37);
    outline-offset: 3px;
}

/* X-style advertisement card using the same spacing grid as RunnerX cards. */
.br-stream-ad {
    --br-border: var(--rx-border, #dce5ed);
    --br-soft: var(--rx-soft-bg, #f7f9fa);
    --br-text: var(--rx-text, #0f1419);
    --br-muted: var(--rx-muted, #536471);
    position: relative;
    min-width: 0;
    color: var(--br-text);
    background: var(--rx-card-bg, #fff);
}

.br-stream-ad__header {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
    align-items: start !important;
}

.br-stream-ad__logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 1px solid var(--br-border) !important;
    background: var(--br-soft) !important;
    font-weight: 900;
    font-size: 20px;
}

.br-stream-ad__logo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.br-stream-ad__identity {
    min-width: 0;
}

.br-stream-ad__identity-line {
    min-width: 0;
}

.br-stream-ad__name {
    max-width: 100% !important;
}

.br-stream-ad__sponsored {
    align-self: start;
    margin-top: 4px;
    color: var(--br-muted);
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
}

.br-stream-ad__text {
    margin: 0 0 10px;
    padding: 0;
    color: var(--br-text);
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Advertisement media uses the globally configured RunnerX media radius. */
.br-stream-ad .br-stream-ad__media {
    position: relative;
    display: block;
    width: 100% !important;
    margin: 10px 0 0 !important;
    overflow: hidden !important;
    border-radius: var(--rx-media-radius, var(--rx-card-radius, var(--rx-radius, 8px))) !important;
    color: inherit;
    text-decoration: none;
    background: var(--br-soft);
}

.br-stream-ad .br-stream-ad__media picture,
.br-stream-ad .br-stream-ad__media img {
    display: block;
    width: 100%;
}

.br-stream-ad .br-stream-ad__media img {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 230px;
    max-height: 520px;
    object-fit: cover;
    border-radius: inherit !important;
}

.br-stream-ad__cta {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 24px);
    padding: 9px 12px;
    border-radius: var(--rx-control-radius, 8px);
    background: rgba(15, 20, 25, .9);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
}

.br-stream-ad__source {
    margin: 7px 0 0;
    color: var(--br-muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.br-stream-ad__actions > .rx-post-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.br-stream-ad__action-spacer {
    display: block;
    min-width: 0;
    min-height: 1px;
}

.br-stream-ad__actions .rx-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: var(--br-muted);
    text-decoration: none;
    cursor: pointer;
}

.br-stream-ad__actions .rx-action:hover,
.br-stream-ad__actions .rx-action.is-active {
    color: var(--rx-link, #1d9bf0);
}

.br-stream-ad__actions .rx-action i {
    font-size: 19px;
}

.br-stream-ad__actions .rx-action span {
    font-size: 13px;
}

.br-stream-ad__actions .rx-action.is-disabled {
    cursor: default;
    opacity: .7;
}

.br-stream-ad__bookmark.is-active {
    color: var(--rx-link, #1d9bf0) !important;
}

@media (max-width: 760px) {
    .br-stream-ad__header {
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
    }

    .br-stream-ad__identity strong {
        font-size: 14px;
    }

    .br-stream-ad__sponsored {
        margin-top: 3px;
        font-size: 12px;
    }

    .br-stream-ad__text {
        margin-bottom: 9px;
        font-size: 14px;
    }

    .br-stream-ad .br-stream-ad__media img {
        min-height: 180px;
        max-height: 420px;
    }

    .br-stream-ad__source {
        font-size: 12px;
    }

}


/* Streamanzeigen folgen exakt dem globalen RunnerX-Kartenraster. */
body .rx-main .br-stream-ad .br-stream-ad__media {
    overflow: hidden !important;
    border-radius: var(--rx-media-radius, var(--rx-card-radius, var(--rx-radius, 8px))) !important;
}
body .rx-main .br-stream-ad .br-stream-ad__media picture,
body .rx-main .br-stream-ad .br-stream-ad__media img {
    border-radius: inherit !important;
}
body .rx-main .br-stream-ad .br-stream-ad__actions,
body .rx-main .br-stream-ad .br-stream-ad__content {
    box-sizing: border-box !important;
}
