/* ==========================================================================
   NexGen Loop Builder — Front-end styles
   ========================================================================== */

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.nexgen-loop-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.nexgen-filter-btn {
    padding: .4rem 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 99px;
    background: transparent;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    transition: all .2s;
    line-height: 1.5;
}
.nexgen-filter-btn:hover,
.nexgen-filter-btn.is-active {
    background: var(--nexgen-accent, #3b82f6);
    border-color: var(--nexgen-accent, #3b82f6);
    color: #fff;
}

/* ── Filtering state ─────────────────────────────────────────────────────── */
.nexgen-loop-grid.nexgen-filtering {
    opacity: .5;
    pointer-events: none;
    transition: opacity .2s;
}

/* ── Load more ──────────────────────────────────────────────────────────── */
.nexgen-load-more-wrap {
    text-align: center;
    margin-top: 2rem;
}
.nexgen-load-more-btn {
    padding: .65rem 2rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all .2s;
}
.nexgen-load-more-btn.is-loading {
    pointer-events: none;
    opacity: .6;
}

/* ── Infinite scroll trigger ────────────────────────────────────────────── */
.nexgen-infinite-trigger {
    display: flex;
    justify-content: center;
    padding: 2rem;
}
.nexgen-infinite-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--nexgen-accent, #3b82f6);
    border-radius: 50%;
    animation: nexgen-spin .7s linear infinite;
    display: none;
}
.nexgen-infinite-trigger.is-loading .nexgen-infinite-spinner { display: block; }

@keyframes nexgen-spin { to { transform: rotate(360deg); } }

/* ── Justified grid ─────────────────────────────────────────────────────── */
.nexgen-layout-justified {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.nexgen-layout-justified .nexgen-loop-item {
    flex: 1 1 200px;
    min-width: 200px;
    border-radius: 0;
    box-shadow: none;
    border: 2px solid #fff;
}
.nexgen-layout-justified .nexgen-loop-thumb { aspect-ratio: unset; height: 250px; }

/* ── Carousel ───────────────────────────────────────────────────────────── */
.nexgen-loop-carousel .swiper-slide { height: auto; }
.nexgen-loop-carousel .nexgen-loop-item { height: 100%; }

/* ── Social share ────────────────────────────────────────────────────────── */
.nexgen-social-share { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.nexgen-share-label { font-size: .875rem; font-weight: 600; color: #374151; }
.nexgen-share-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }

.nexgen-share-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .2s, transform .15s;
    line-height: 1.4;
}
.nexgen-share-btn:hover { opacity: .85; transform: translateY(-1px); }

.nexgen-share-rounded { border-radius: 6px; }
.nexgen-share-circle  { border-radius: 99px; }
.nexgen-share-square  { border-radius: 0; }

/* Minimal mode */
.nexgen-share-color-minimal .nexgen-share-btn {
    background: #f3f4f6;
    color: #374151;
}
.nexgen-share-color-minimal .nexgen-share-btn:hover {
    background: #e5e7eb;
}

/* Icon-only sizing */
.nexgen-share-style-icon-only .nexgen-share-btn {
    padding: .5rem;
    width: 36px;
    height: 36px;
    justify-content: center;
}
.nexgen-share-style-icon-only.nexgen-share-circle .nexgen-share-btn { border-radius: 50%; }
