/* Sticky-Leisten der A-vs-B-Seiten (public/partials/compare-sticky.php), Muster der Börsen-Vergleiche. */

.kb-cmp-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 8px 0;
    border-bottom: 1px solid var(--kb-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.kb-cmp-top.visible {
    transform: translateY(0);
}

.admin-bar .kb-cmp-top {
    top: 32px;
}

.kb-cmp-top-inner {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    min-height: 48px;
    margin: 0 auto;
    padding: 0 20px;
}

.kb-cmp-side {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--kb-text);
    font-weight: 700;
    text-decoration: none;
}

.kb-cmp-side img,
.kb-cmp-bottom-name img {
    border: 1px solid var(--kb-border);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.kb-cmp-vs {
    color: var(--kb-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.kb-cmp-change {
    margin-left: 18px;
}

/* Unten: nur auf dem Handy, wie bei den Börsen */
.kb-cmp-bottom {
    display: none;
}

@media (max-width: 768px) {
    .admin-bar .kb-cmp-top {
        top: 46px;
    }

    .kb-cmp-side span {
        display: none;
    }

    .kb-cmp-change {
        margin-left: auto;
    }

    .kb-cmp-bottom {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 999;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px 12px;
        border-top: 1px solid var(--kb-border);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
    }

    .kb-cmp-bottom-item {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
    }

    .kb-cmp-bottom-name {
        display: flex;
        gap: 6px;
        align-items: center;
        min-width: 0;
        color: var(--kb-text);
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }

    .kb-cmp-bottom-name span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .kb-cmp-bottom .kb-btn,
    .kb-cmp-bottom .kb-geo-na {
        box-sizing: border-box; /* sonst ragte der Knopf um seinen Innenabstand über die halbe Breite hinaus */
        justify-content: center;
        width: 100%;
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
        white-space: nowrap;
    }

    /* Platz für die untere Leiste, damit der Footer nicht verdeckt wird */
    .kb-has-cmp-bottom {
        padding-bottom: 90px;
    }
}
