/* Reusable promo ad — width follows host; height stays 80px (matches source ad). */

.promo-ad-root {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: none;
}

.promo-ad-root.is-visible {
    display: block;
}

.promo-ad-root *,
.promo-ad-root *::before,
.promo-ad-root *::after {
    box-sizing: border-box;
}

/* =====================================================
   MAIN AD
===================================================== */

.promo-ad-root .wwf-ad {
    position: relative;

    width: 100%;
    height: 80px;

    overflow: hidden;

    display: flex;
    align-items: center;

    padding: 10px 16px;

    border-radius: 11px;

    text-decoration: none;
    color: white;

    background:
        linear-gradient(
            110deg,
            #071e3d 0%,
            #0b4ea2 55%,
            #0877e8 100%
        );

    box-shadow:
        0 5px 20px rgba(0, 40, 100, 0.18);

    cursor: pointer;
}

/* =====================================================
   BACKGROUND GLOW
===================================================== */

.promo-ad-root .background-glow {
    position: absolute;

    width: 220px;
    height: 220px;

    left: -70px;
    top: -150px;

    border-radius: 50%;

    background:
        rgba(82, 194, 255, 0.16);

    animation:
        promoAdBackgroundMove 7s ease-in-out infinite alternate;

    pointer-events: none;
}

@keyframes promoAdBackgroundMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(120px);
    }
}

/* =====================================================
   ATTENTION SHINE
===================================================== */

.promo-ad-root .attention-shine {
    position: absolute;

    top: 0;
    left: -150px;

    width: 90px;
    height: 100%;

    opacity: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.13),
            transparent
        );

    transform: skewX(-20deg);

    animation:
        promoAdShine 3s ease-in-out 5s infinite;

    pointer-events: none;

    z-index: 1;
}

@keyframes promoAdShine {
    0% {
        left: -150px;
        opacity: 0;
    }

    4% {
        opacity: 1;
    }

    20% {
        left: calc(100% + 100px);
        opacity: 0;
    }

    100% {
        left: calc(100% + 100px);
        opacity: 0;
    }
}

/* =====================================================
   LOGO
===================================================== */

.promo-ad-root .ad-icon {
    position: relative;
    z-index: 2;

    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    margin-right: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.13);

    border:
        1px solid rgba(255, 255, 255, 0.18);

    overflow: hidden;
}

.promo-ad-root .ad-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

/* =====================================================
   TEXT
===================================================== */

.promo-ad-root .ad-content {
    position: relative;
    z-index: 2;

    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-ad-root .headline-window {
    position: relative;

    height: 26px;

    overflow: hidden;
}

.promo-ad-root .headline {
    position: absolute;

    top: 0;
    left: 0;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    line-height: 26px;

    font-weight: 700;

    white-space: nowrap;

    opacity: 0;

    transform:
        translateY(14px);

    animation:
        promoAdHeadlineCycle 6s infinite;
}

.promo-ad-root .headline.second {
    animation-delay: 3s;
}

@keyframes promoAdHeadlineCycle {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    8% {
        opacity: 1;
        transform: translateY(0);
    }

    42% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0;
        transform: translateY(-12px);
    }

    100% {
        opacity: 0;
    }
}

.promo-ad-root .subtext {
    margin-top: 2px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;

    font-weight: 400;

    line-height: 18px;

    color:
        rgba(255, 255, 255, 0.93);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

/* =====================================================
   CTA BUTTON
===================================================== */

.promo-ad-root .ad-cta {
    position: relative;
    z-index: 3;

    flex-shrink: 0;

    min-width: 120px;

    height: 38px;

    margin-left: 18px;

    padding:
        0 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border-radius: 8px;

    background: white;

    color:
        #075cc4;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

    animation:
        promoAdCtaAttention 3s ease-in-out 5s infinite;
}

@keyframes promoAdCtaAttention {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }

    5% {
        transform: scale(1.04);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.11);
    }

    10% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

.promo-ad-root .search-icon {
    width: 16px;
    height: 16px;

    stroke: currentColor;

    stroke-width: 2.2;

    fill: none;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.promo-ad-root .wwf-ad:hover .ad-cta {
    box-shadow:
        0 5px 15px
        rgba(0, 0, 0, 0.18);
}

/* =====================================================
   MOBILE — BELOW 600px (height stays 80px)
===================================================== */

@media (max-width: 600px) {
    .promo-ad-root .wwf-ad {
        height: 80px;
        padding: 9px 10px;
        border-radius: 9px;
    }

    .promo-ad-root .ad-icon {
        flex: 0 0 40px;

        width: 40px;
        height: 40px;

        margin-right: 9px;

        border-radius: 9px;
    }

    .promo-ad-root .ad-logo {
        width: 34px;
        height: 34px;
    }

    .promo-ad-root .headline-window {
        height: 23px;
    }

    .promo-ad-root .headline {
        font-size: 16px;
        line-height: 23px;
        font-weight: 700;
    }

    .promo-ad-root .subtext {
        margin-top: 2px;

        font-size: 12px;
        line-height: 16px;

        font-weight: 400;

        color: rgba(255, 255, 255, 0.94);
    }

    .promo-ad-root .ad-cta {
        min-width: 88px;

        height: 34px;

        margin-left: 8px;

        padding: 0 9px;

        gap: 5px;

        border-radius: 7px;

        font-size: 11.5px;
        font-weight: 700;
    }

    .promo-ad-root .search-icon {
        width: 13px;
        height: 13px;

        stroke-width: 2.3;
    }
}

/* =====================================================
   ACCESSIBILITY
===================================================== */

@media (prefers-reduced-motion: reduce) {
    .promo-ad-root *,
    .promo-ad-root *::before,
    .promo-ad-root *::after {
        animation: none !important;
        transition: none !important;
    }

    .promo-ad-root .headline:first-child {
        opacity: 1;
        transform: none;
    }
}

/* Sit below tool result actions with a little breathing room */
.tool-workspace .promo-ad-root.is-visible {
    margin-top: 14px;
}
