/* AtListingLoader v0.1.1 · Zähler, Balken, «Mehr anzeigen» unter dem Listing. Nur px (Theme-Root 10px).
   Look = Kachel-Buttons (.ssik-listing .product-box .btn-buy): --lv2-ink, Radius 10, 44 hoch, Ubuntu 700 14px. */
.at-ll {
    --at-ll-ink: var(--lv2-ink, #111111);
    --at-ll-ink-hover: var(--lv2-ink-hover, #2d2d2d);
    --at-ll-muted: var(--lv2-muted, #767676);
    --at-ll-border: var(--lv2-border, #e8e8e8);
    --at-ll-soft: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0 24px;
    text-align: center;
}
.at-ll__count {
    font-size: 14px;
    color: var(--at-ll-muted);
    margin-bottom: 10px;
}
.at-ll__bar {
    width: 240px;
    max-width: 100%;
    height: 4px;
    margin-bottom: 20px;
    background: var(--at-ll-border);
    border-radius: 2px;
    overflow: hidden;
}
.at-ll__bar span {
    display: block;
    height: 100%;
    background: var(--at-ll-ink);
    border-radius: 2px;
    transition: width .3s ease;
}
/* Drei Spalten: «Mehr anzeigen» exakt mittig unter Zähler und Balken, «Nach oben» rechts daneben */
.at-ll__actions {
    display: grid;
    grid-template-columns: 1fr minmax(0, 260px) 1fr;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}
.at-ll__actions .at-ll__more {
    grid-column: 2;
}
.at-ll__actions .at-ll__top {
    grid-column: 3;
    justify-self: start;
}
.at-ll.is-done .at-ll__actions .at-ll__top {
    grid-column: 2;
    justify-self: center;
}

/* Hauptknopf: wie «In den Warenkorb» auf der Kachel, alle Zustände selbst gesetzt */
.at-ll__more,
.at-ll__more:visited {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 24px;
    border: 1px solid var(--at-ll-ink);
    border-radius: 10px;
    background: var(--at-ll-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}
.at-ll__more:hover,
.at-ll__more:focus,
.at-ll__more:active {
    background: var(--at-ll-ink-hover);
    border-color: var(--at-ll-ink-hover);
    color: #fff;
    text-decoration: none;
}
.at-ll__more:focus {
    outline: none;
}
.at-ll__more:focus-visible {
    outline: 2px solid var(--at-ll-ink);
    outline-offset: 2px;
}

/* Zweitknopf «Nach oben»: hell, gleiche Form */
.at-ll__top,
.at-ll__top:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--at-ll-border);
    border-radius: 10px;
    background: var(--at-ll-soft);
    color: var(--at-ll-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}
.at-ll__top:hover,
.at-ll__top:focus,
.at-ll__top:active {
    background: #ebebeb;
    border-color: #dcdcdc;
    color: var(--at-ll-ink);
    text-decoration: none;
}
.at-ll__top:focus {
    outline: none;
}
.at-ll__top:focus-visible {
    outline: 2px solid var(--at-ll-ink);
    outline-offset: 2px;
}
.at-ll__top-icon {
    flex: 0 0 16px;
}

/* Laden: Text weg, Spinner im Knopf, Farbe bleibt */
.at-ll.is-loading .at-ll__more {
    color: transparent;
    pointer-events: none;
    background: var(--at-ll-ink-hover);
    border-color: var(--at-ll-ink-hover);
}
.at-ll.is-loading .at-ll__more::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: at-ll-spin .7s linear infinite;
}

/* Ende der Liste: nur noch «Nach oben» */
.at-ll.is-done .at-ll__more,
.at-ll.is-done .at-ll__bar {
    display: none;
}
@keyframes at-ll-spin {
    to { transform: rotate(360deg); }
}

/* Handy: Hauptknopf füllt die Zeile, «Nach oben» nur als Pfeil (Text bleibt für Screenreader) */
@media (max-width: 575px) {
    .at-ll {
        margin-top: 32px;
    }
    .at-ll__actions {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }
    .at-ll__top {
        width: 44px;
        padding: 0;
    }
    .at-ll__top-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .at-ll.is-done .at-ll__top {
        width: auto;
        padding: 11px 16px;
    }
    .at-ll.is-done .at-ll__top-text {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }
}
@media (prefers-reduced-motion: reduce) {
    .at-ll__bar span,
    .at-ll__more,
    .at-ll__top {
        transition: none;
    }
}
/* Solange Tanmar noch aktiv ist (Live), bleibt dessen Nachladen allein */
.is-tanmar-infinite-scrolling .at-ll {
    display: none;
}
