body.promo-preview {
    --promo-height: 64px;
}

body.promo-preview #auto {
    height: calc(100% - 136px - var(--promo-height));
}

.yxab-promo {
    position: relative;
    height: var(--promo-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 64px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

.yxab-promo-label {
    position: absolute;
    left: 18px;
    color: var(--muted);
    font-size: 11px;
}

.yxab-promo-link {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    color: inherit;
    text-decoration: none;
}

/* Stretch the native link without nesting the dismiss controls inside it. */
.yxab-promo-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
}

.yxab-promo-copy,
.yxab-promo-detail {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 16px;
    min-width: 0;
}

.yxab-promo-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}

.yxab-promo-detail {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    gap: 0 12px;
}

.yxab-promo-cta {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.yxab-promo-domain {
    font-size: 11px;
    font-weight: 400;
    margin-right: 12px;
    opacity: .8;
}

.yxab-promo-close {
    position: relative;
    z-index: 2;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--muted);
    border-radius: 4px;
    font-size: 22px;
    line-height: 1;
}

.yxab-promo-close:hover,
.yxab-promo-close[aria-expanded="true"] {
    background: var(--surface-soft);
    color: var(--text);
}

.yxab-promo-link:hover .yxab-promo-title,
.yxab-promo-link:hover .yxab-promo-cta {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.yxab-promo-link:focus-visible {
    outline: none;
}

.yxab-promo-link:focus-visible::after,
.yxab-promo button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
    border-radius: 4px;
}

.yxab-promo-close-menu {
    position: fixed;
    z-index: 1150;
    width: 144px;
    padding: 4px;
    box-sizing: border-box;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.yxab-promo-close-menu button {
    display: block;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 3px;
    text-align: left;
    background: transparent;
    color: inherit;
    font-size: 13px;
}

.yxab-promo-close-menu button:hover,
.yxab-promo-close-menu button:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

@media (max-width: 1100px) {
    .yxab-promo-copy {
        flex-direction: column;
        gap: 2px;
    }

    .yxab-promo-domain {
        display: none;
    }
}

@media (max-width: 980px) {
    body.promo-preview #auto {
        height: calc(100% - 174px - var(--promo-height));
    }
}

@media (max-width: 760px) {
    body.promo-preview {
        --promo-height: 68px;
    }

    body.promo-preview #auto {
        height: calc(100% - 244px - var(--promo-height));
    }

    .yxab-promo {
        gap: 6px;
        padding: 8px 8px 8px 34px;
    }

    .yxab-promo-label {
        left: 8px;
        font-size: 10px;
    }

    .yxab-promo-link {
        flex: 1;
        justify-content: space-between;
        gap: 8px;
    }

    .yxab-promo-title {
        font-size: 13px;
    }

    .yxab-promo-detail {
        flex-direction: column;
        font-size: 10px;
        line-height: 1.5;
    }

    .yxab-promo-cta {
        font-size: 11px;
    }

    .yxab-promo-close {
        width: 24px;
        height: 28px;
        flex-basis: 24px;
    }
}

@media (max-width: 380px) {
    .yxab-promo-title {
        font-size: 12px;
    }
}
