.ad-cluster {
    width: 100%;
}

.ad-cluster:not(:has(.ad-slot-shell)) {
    display: none;
}

.ad-cluster--footer {
    padding-bottom: 1.5rem;
}

.ad-cluster__container {
    display: grid;
    gap: 1rem;
    max-width: min(1580px, calc(100vw - 2rem));
    padding-right: clamp(1rem, 2vw, 1.75rem);
    padding-left: clamp(1rem, 2vw, 1.75rem);
}

.ad-cluster__split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
}

.ad-slot-shell {
    display: grid;
    justify-items: center;
}

.ad-slot-shell--stage-intro {
    position: relative;
    min-height: 100svh;
    padding: clamp(1.4rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    align-content: center;
    justify-items: center;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 22%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.14), transparent 24%),
        linear-gradient(135deg, rgba(21, 64, 134, 0.98) 0%, rgba(20, 97, 162, 0.98) 58%, rgba(89, 155, 211, 0.96) 100%);
}

.ad-slot-shell__stage-head {
    position: absolute;
    top: clamp(1rem, 3vw, 1.8rem);
    left: clamp(1rem, 3vw, 1.8rem);
    right: clamp(1rem, 3vw, 1.8rem);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: none;
}

.ad-slot-shell__stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--jelonka-white);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 14px 28px rgba(6, 18, 32, 0.14);
}

.ad-slot-shell__stage-close {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--jelonka-white);
    font-size: 1.7rem;
    line-height: 1;
    box-shadow: 0 14px 28px rgba(6, 18, 32, 0.18);
}

.ad-slot-shell__stage-close:hover,
.ad-slot-shell__stage-close:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--jelonka-white);
}

.ad-slot-shell--desktop-rail {
    justify-items: stretch;
}

.ad-slot-shell--mobile-only {
    display: none;
}

.ad-slot-shell--infeed-card {
    grid-column: 1 / -1;
    margin: 0.1rem 0 0.35rem;
}

.ad-slot-shell--content-band {
    margin: 1rem 0 1.25rem;
}

.ad-cluster__mobile-stack {
    display: none;
    gap: 0.85rem;
}

.ad-slot {
    display: grid;
    gap: 0.65rem;
    width: min(100%, calc(var(--slot-width) * 1px));
}

.ad-slot-shell--stage-intro .ad-slot {
    width: min(100%, calc(var(--slot-width) * 1px));
}

.ad-slot-shell--stage-intro .ad-slot__frame {
    box-shadow: 0 30px 80px rgba(10, 18, 34, 0.28);
}

.ad-slot-shell--stage-intro .ad-slot__placeholder {
    border-color: rgba(255, 255, 255, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(243, 246, 250, 0.98) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(20, 97, 162, 0.06) 0,
            rgba(20, 97, 162, 0.06) 14px,
            rgba(190, 86, 0, 0.04) 14px,
            rgba(190, 86, 0, 0.04) 28px
        );
}

.ad-slot__frame {
    position: relative;
    width: 100%;
    aspect-ratio: var(--slot-width) / var(--slot-height);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 246, 250, 0.98) 100%);
    box-shadow: 0 18px 40px rgba(23, 33, 38, 0.08);
}

.ad-slot__item,
.ad-slot__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100%;
}

.ad-slot__item {
    align-items: stretch;
    justify-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    text-decoration: none;
}

.ad-slot__item.is-hidden {
    display: none;
}

.ad-slot__media {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    background-color: rgba(255, 255, 255, 0.98);
}

.ad-slot__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.98);
}

.ad-slot__image.is-hidden {
    display: none;
}

.ad-slot.has-fluid-height .ad-slot__frame {
    aspect-ratio: auto;
}

.ad-slot.has-fluid-height .ad-slot__item {
    position: relative;
    inset: auto;
    display: block;
    height: auto;
}

.ad-slot.has-fluid-height .ad-slot__media {
    height: auto;
}

.ad-slot.has-fluid-height .ad-slot__image {
    height: auto;
}

.ad-slot__video {
    width: 100%;
    height: 100%;
    display: block;
    background: #0b1220;
}

.ad-slot__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: none;
}

.ad-slot__pixel {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    bottom: 0;
    right: 0;
}

.ad-slot__placeholder {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.55rem;
    padding: 1.4rem;
    border: 4px dashed rgba(20, 97, 162, 0.36);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(243, 246, 250, 0.98) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(20, 97, 162, 0.05) 0,
            rgba(20, 97, 162, 0.05) 14px,
            rgba(190, 86, 0, 0.04) 14px,
            rgba(190, 86, 0, 0.04) 28px
        );
    color: var(--jelonka-ink);
    text-align: center;
}

.ad-slot__placeholder-name {
    color: var(--jelonka-ink-soft);
    font-size: clamp(0.75rem, 1vw, 0.95rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-slot__placeholder-label {
    font-size: clamp(1rem, 2.4vw, 2rem);
    line-height: 1.1;
    text-transform: uppercase;
}

.ad-slot__placeholder--picker {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-content: center;
    justify-items: start;
    gap: clamp(0.55rem, 1vw, 0.85rem);
    padding: clamp(0.55rem, 1.2vw, 0.95rem);
    border-style: solid;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ad-slot__placeholder--picker:hover,
.ad-slot__placeholder--picker:focus-within {
    border-color: rgba(11, 87, 208, 0.7);
    box-shadow: inset 0 0 0 2px rgba(11, 87, 208, 0.1);
}

.ad-slot__placeholder--picker.is-selected {
    border-color: rgba(11, 87, 208, 0.95);
    background:
        linear-gradient(180deg, rgba(237, 244, 255, 0.98) 0%, rgba(226, 237, 255, 0.98) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(11, 87, 208, 0.07) 0,
            rgba(11, 87, 208, 0.07) 14px,
            rgba(20, 97, 162, 0.03) 14px,
            rgba(20, 97, 162, 0.03) 28px
        );
    box-shadow: inset 0 0 0 3px rgba(11, 87, 208, 0.18);
}

.ad-slot__picker-check {
    display: grid;
    place-items: center;
}

.ad-slot__picker-check input {
    margin: 0;
    width: clamp(1rem, 1.4vw, 1.15rem);
    height: clamp(1rem, 1.4vw, 1.15rem);
    cursor: pointer;
}

.ad-slot__picker-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.ad-slot__picker-kind {
    color: var(--jelonka-ink-soft);
    font-size: clamp(0.72rem, 0.95vw, 0.88rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.ad-slot__picker-size {
    color: var(--jelonka-ink);
    font-size: clamp(0.92rem, 1.6vw, 1.4rem);
    line-height: 1.1;
    text-transform: uppercase;
}

.ad-slot__indicators {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
}

.ad-slot__indicator {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: rgba(20, 97, 162, 0.18);
}

.ad-slot__indicator.is-active {
    background: rgba(190, 86, 0, 0.88);
}

@media (max-width: 991.98px) {
    .ad-cluster__split {
        grid-template-columns: minmax(0, 1fr);
    }

    .ad-slot-shell--stage-intro {
        min-height: min(88svh, 44rem);
        padding-top: 4.6rem;
    }

    .ad-slot-shell--desktop-rail {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .ad-cluster__container {
        gap: 0.85rem;
    }

    .ad-cluster__split--desktop,
    .ad-slot-shell--desktop-only {
        display: none !important;
    }

    .ad-cluster__mobile-stack,
    .ad-slot-shell--mobile-only {
        display: grid;
    }

    .ad-slot__placeholder {
        padding: 1rem;
        border-width: 3px;
    }

    .ad-slot-shell__stage-head {
        top: 0.85rem;
        left: 0.85rem;
        right: 0.85rem;
    }

    .ad-slot-shell__stage-badge {
        font-size: 0.74rem;
        padding: 0.5rem 0.78rem;
    }

    .ad-slot-shell__stage-close {
        width: 2.6rem;
        height: 2.6rem;
        font-size: 1.45rem;
    }
}

body.ad-slot-picker-body--mobile .ad-cluster__split--desktop,
body.ad-slot-picker-body--mobile .ad-slot-shell--desktop-only,
body.ad-slot-picker-body--desktop .ad-cluster__mobile-stack,
body.ad-slot-picker-body--desktop .ad-slot-shell--mobile-only {
    display: none !important;
}

body.ad-slot-picker-body--mobile .ad-cluster__mobile-stack,
body.ad-slot-picker-body--mobile .ad-slot-shell--mobile-only {
    display: grid !important;
}
