.floating-ads-top {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    z-index: 39;
}

.floating-ads-top--sticky {
    position: sticky;
    top: var(--floating-ads-sticky-offset, var(--frontend-plugin-sticky-top, 0px));
}

.floating-ads-top__viewport {
    margin: 0 auto;
    box-sizing: border-box;
    width: min(100%, var(--frontend-plugin-content-max-width, 80rem));
    min-height: 3.5rem;
    padding: 0.5rem 1rem;
}

.floating-ads-top__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
}

.floating-ads-top__slide[hidden] {
    display: none;
}

.floating-ads-top__dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    padding: 0 0 0.5rem;
}

.floating-ads-top__dot {
    width: 0.5rem;
    height: 0.5rem;
    border: 0;
    border-radius: 50%;
    background: #9ca3af;
    cursor: pointer;
    padding: 0;
}

.floating-ads-top__dot.is-active {
    background: #2563eb;
}

.floating-ads-sides {
    color: #1f2937;
    --floating-ads-side-min-width: 96px;
    --floating-ads-side-available-width: calc(
        (100vw - var(--frontend-plugin-content-max-width, 80rem)) / 2 - 2rem
    );
}

.floating-ads-side {
    position: fixed;
    top: calc(var(--floating-ads-side-top-offset, 0px) + 1rem);
    z-index: 30;
    display: flex;
    max-height: calc(100vh - var(--floating-ads-side-top-offset, 0px) - 2rem);
    width: clamp(
        var(--floating-ads-side-min-width),
        var(--floating-ads-side-available-width),
        var(--floating-ads-side-width)
    );
    flex-direction: column;
    gap: var(--floating-ads-side-gap);
    overflow-y: auto;
}

.floating-ads-side--left {
    left: max(1rem, calc((100vw - 80rem) / 2 - var(--floating-ads-side-width) - 1rem));
}

.floating-ads-side--right {
    right: max(1rem, calc((100vw - 80rem) / 2 - var(--floating-ads-side-width) - 1rem));
}

.floating-ads-side__item {
    overflow: hidden;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.12);
}

.floating-ads__image,
.floating-ads__image-link img {
    display: block;
    height: auto;
    width: 100%;
    max-width: 100%;
}

.floating-ads__image-link,
.floating-ads__text-link {
    color: inherit;
    text-decoration: none;
}

.floating-ads__text,
.floating-ads__text-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
}

.floating-ads__text strong,
.floating-ads__text-link strong {
    font-size: 0.9rem;
}

.floating-ads__text span,
.floating-ads__text-link span {
    font-size: 0.8rem;
    line-height: 1.45;
}

.floating-ads__custom-code {
    overflow: hidden;
}

.floating-ads__custom-code img,
.floating-ads__custom-code iframe,
.floating-ads__custom-code video {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .floating-ads-side__item {
        border-color: #4b5563;
        background: #1f2937;
        color: #f3f4f6;
    }
}
