.fd-ads-slot {
    width: 100%;
    margin: 0.85rem 0;
}

.fd-ads-slot--header_top {
    margin: 0;
}

.fd-ads-slot.is-floating {
    position: fixed;
    z-index: 1040;
    width: min(340px, calc(100vw - 1.5rem));
    margin: 0;
    bottom: 1.1rem;
}

.fd-ads-slot--floating_br {
    inset-inline-start: 1rem;
}

.fd-ads-slot--floating_bl {
    inset-inline-end: 1rem;
}

.fd-ads-slot.is-popup {
    position: fixed;
    inset: 0;
    z-index: 1055;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.fd-ads-slot.is-popup .fd-ad {
    width: min(560px, 100%);
    max-height: 85vh;
    overflow: auto;
}

.fd-ad {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, #0b1f4d, #1a56db);
    color: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.fd-ad__label {
    position: absolute;
    top: 0.65rem;
    inset-inline-start: 0.75rem;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
}

.fd-ad__close {
    position: absolute;
    top: 0.45rem;
    inset-inline-end: 0.55rem;
    z-index: 3;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.fd-ad__body {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 0.9rem;
    align-items: center;
    padding: 1.15rem 1.15rem 1.05rem;
    min-height: 120px;
}

.fd-ad--image .fd-ad__body {
    grid-template-columns: 1fr;
    padding: 0;
    min-height: 0;
}

.fd-ad--text .fd-ad__body,
.fd-ad--card .fd-ad__body {
    grid-template-columns: 1fr;
}

.fd-ad__media {
    min-width: 0;
}

.fd-ad__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.fd-ad--image .fd-ad__img {
    max-height: none;
    border-radius: 0;
}

.fd-ad__img--mobile {
    display: none;
}

.fd-ad__title {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: inherit;
}

.fd-ad__subtitle,
.fd-ad__text {
    margin: 0;
    opacity: 0.92;
    font-size: 0.92rem;
    line-height: 1.55;
}

.fd-ad__text {
    margin-top: 0.35rem;
}

.fd-ad__btn {
    display: inline-flex;
    margin-top: 0.75rem;
    padding: 0.48rem 0.9rem;
    border-radius: 999px;
    background: var(--fd-ad-accent, #fff);
    color: #0b1f4d;
    font-weight: 800;
    font-size: 0.86rem;
}

.fd-ad-device--desktop {
    display: block;
}

.fd-ad-device--mobile {
    display: none;
}

/* Effects */
.fd-ad-effect--fade_in {
    animation: fdAdFade 0.7s ease both;
}

.fd-ad-effect--slide_up {
    animation: fdAdSlideUp 0.65s ease both;
}

.fd-ad-effect--slide_down {
    animation: fdAdSlideDown 0.65s ease both;
}

.fd-ad-effect--pulse {
    animation: fdAdPulse 2.2s ease-in-out infinite;
}

.fd-ad-effect--bounce {
    animation: fdAdBounce 1.4s ease both;
}

.fd-ad-effect--glow {
    box-shadow: 0 0 0 0 rgba(26, 86, 219, 0.45), 0 14px 34px rgba(15, 23, 42, 0.12);
    animation: fdAdGlow 2s ease-in-out infinite;
}

.fd-ad-effect--shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 45%, transparent 70%);
    transform: translateX(-120%);
    animation: fdAdShimmer 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fdAdFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fdAdSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fdAdSlideDown {
    from { opacity: 0; transform: translateY(-18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fdAdPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

@keyframes fdAdBounce {
    0% { transform: translateY(16px); opacity: 0; }
    60% { transform: translateY(-6px); opacity: 1; }
    100% { transform: translateY(0); }
}

@keyframes fdAdGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 86, 219, 0.35), 0 14px 34px rgba(15, 23, 42, 0.12); }
    50% { box-shadow: 0 0 0 10px rgba(26, 86, 219, 0), 0 18px 40px rgba(15, 23, 42, 0.16); }
}

@keyframes fdAdShimmer {
    100% { transform: translateX(120%); }
}

.fd-ad.is-hidden {
    display: none !important;
}

@media (max-width: 767.98px) {
    .fd-ad__body {
        grid-template-columns: 1fr;
    }

    .fd-ad__img--desktop {
        display: none;
    }

    .fd-ad__img--mobile {
        display: block;
    }

    .fd-ad:not(:has(.fd-ad__img--mobile)) .fd-ad__img--desktop {
        display: block;
    }

    .fd-ad-device--desktop {
        display: none;
    }

    .fd-ad-device--mobile {
        display: block;
    }

    .fd-ads-slot.is-floating {
        width: min(100%, calc(100vw - 1rem));
        inset-inline: 0.5rem;
        bottom: 0.75rem;
    }
}
