/* ENFAVORI HOME HORIZONTAL SWIPE V1
   Two existing card families only. List ordering/type-group logic untouched.
   Last-loaded in each existing V4 stylesheet; webroot is patched separately. */
.ef4 .ef4-home-list-grid.ef4-swipe__track,
.ef4 .ef4-inside__grid.ef4-swipe__track {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: calc((100% - 48px) / 4);
    align-items: stretch;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
    margin: -4px 0 -10px;
    padding: 4px 2px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.ef4 .ef4-home-list-grid.ef4-swipe__track::-webkit-scrollbar,
.ef4 .ef4-inside__grid.ef4-swipe__track::-webkit-scrollbar {
    display: none;
}
.ef4 .ef4-swipe__track > .ef4-list-card,
.ef4 .ef4-swipe__track > .ef4-inside-card {
    min-width: 0;
    max-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}
.ef4 .ef4-swipe__track:focus-visible {
    outline: 2px solid #119e93;
    outline-offset: 3px;
    border-radius: 12px;
}
.ef4 .ef4-swipe__controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex: 0 0 auto;
}
.ef4 .ef4-swipe__controls.is-static { display: none; }
.ef4 .ef4-swipe__arrow {
    display: inline-grid;
    width: 35px;
    height: 35px;
    place-items: center;
    padding: 0;
    border: 1px solid #c9dce5;
    border-radius: 10px;
    background: #fff;
    color: #142844;
    font-size: 19px;
    line-height: 1;
    font-weight: 750;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.ef4 .ef4-swipe__arrow:hover:not(:disabled) {
    background: #e8f8f5;
    border-color: #0aa99d;
}
.ef4 .ef4-swipe__arrow:disabled {
    opacity: .35;
    cursor: default;
}
.ef4 .ef4-swipe__arrow:focus-visible {
    outline: 3px solid #0aa99d;
    outline-offset: 2px;
}
.ef4 .ef4-home-lists .ef4-section__head {
    gap: 10px 14px;
}
.ef4 .ef4-home-lists .ef4-swipe__controls {
    margin-inline-start: auto;
}
.ef4 .ef4-home-lists .ef4-more {
    flex: 0 0 auto;
}
.ef4 .ef4-inside__group.ef4-swipe {
    min-width: 0;
}
.ef4 .ef4-swipe__type-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-bottom: 15px;
}
.ef4 .ef4-swipe__type-row > .ef4-inside__group-heading {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}
.ef4 .ef4-swipe__type-row > .ef4-swipe__controls {
    margin-bottom: 10px;
}
.ef4 .ef4-swipe__mixed-controls {
    display: flex;
    justify-content: flex-end;
    margin: -28px 0 12px;
}
@media (max-width: 1050px) {
    .ef4 .ef4-home-list-grid.ef4-swipe__track,
    .ef4 .ef4-inside__grid.ef4-swipe__track {
        grid-auto-columns: calc((100% - 16px) / 2.15);
    }
}
@media (max-width: 760px) {
    .ef4 .ef4-home-list-grid.ef4-swipe__track,
    .ef4 .ef4-inside__grid.ef4-swipe__track {
        grid-auto-columns: min(84%, 380px);
        gap: 12px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
    }
    /* Native swipe exposes a preview of the next card; arrows disappear. */
    .ef4 .ef4-swipe__controls { display: none !important; }
    .ef4 .ef4-swipe__type-row { margin-bottom: 13px; }
    .ef4 .ef4-swipe__type-row > .ef4-inside__group-heading { margin-bottom: 0; }
    .ef4 .ef4-swipe__mixed-controls { display: none; }
}
@media (max-width: 390px) {
    .ef4 .ef4-home-list-grid.ef4-swipe__track,
    .ef4 .ef4-inside__grid.ef4-swipe__track {
        grid-auto-columns: 87%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .ef4 .ef4-home-list-grid.ef4-swipe__track,
    .ef4 .ef4-inside__grid.ef4-swipe__track {
        scroll-behavior: auto;
    }
    .ef4 .ef4-swipe__arrow { transition: none; }
}
:is(html[data-theme="dark"], body.theme-dark, body.dark-mode)
 .ef4 .ef4-swipe__arrow {
    color: #edf7ff;
    border-color: #496477;
    background: #19364b;
}

/* Live lab-directory cards are not the former ef4-list-card family. */
.ef4 .ef4-home-list-grid.ef4-swipe__track > * {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    scroll-snap-align: start;
}
