/* ═══════════════════════════════════════════════════════════
   JECP — Pagination CSS
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────────────── */
.jecp-pagination {
    margin: 20px 0;
    width: 100%;
}

/* ── Flex Row ────────────────────────────────────────────── */
.jecp-pages {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

/* ── Base Button ─────────────────────────────────────────── */
.jecp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    text-decoration: none;
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
    background: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
}

/* ── SVG / Icon inside button ────────────────────────────── */
.jecp-btn svg,
.jecp-btn i {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

/* ── Hover (base — Elementor overrides these) ────────────── */
.jecp-btn:hover:not(:disabled):not(.jecp-active) {
    opacity: 0.85;
}

/* ── Active (current page) ───────────────────────────────── */
.jecp-btn.jecp-active {
    cursor: default;
    pointer-events: none;
    font-weight: bold;
}

/* ── Disabled (prev on page 1, next on last page) ────────── */
.jecp-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Dots ( … ) ──────────────────────────────────────────── */
.jecp-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 5px;
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
    border-color: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    letter-spacing: 1px;
}


/* ═══════════════════════════════════════════════════════════
   RANGE TYPE  —  ‹  1–10 of 50  ›
   ═══════════════════════════════════════════════════════════ */

/* Range wrapper keeps same .jecp-pages flex row */
.jecp-type-range .jecp-pages {
    flex-wrap: nowrap;          /* never wrap — always one line */
    justify-content: center;
}

/* ── Range label pill ────────────────────────────────────── */
.jecp-range-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    height: 40px;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    /* Elementor will override color / bg / border / radius */
}

/* ── Prev / Next buttons in range mode ───────────────────── */
.jecp-type-range .jecp-btn {
    /* Same base style, Elementor controls take over */
    flex-shrink: 0;
}

/* Loading overlay while AJAX is in flight */
.jecp-pagination.jecp-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════
   JECP — Loader
   ═══════════════════════════════════════════════════════════════ */

/* Overlay — covers the listing grid */
.jecp-loader-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    pointer-events: none;
}

/* Listing wrapper needs position:relative for overlay */
.jecp-listing-loading {
    position: relative;
    overflow: hidden;
}

/* Base loader container */
.jecp-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.jecp-loader-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: #3b82f6;
    animation: jecp-spin var(--jecp-loader-speed, 700ms) linear infinite;
    box-sizing: border-box;
}

@keyframes jecp-spin {
    to { transform: rotate(360deg); }
}

/* ── Dots ────────────────────────────────────────────────────── */
.jecp-loader-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
}

.jecp-loader-dots span {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: jecp-dot-bounce 700ms ease-in-out infinite;
}

.jecp-loader-dots span:nth-child(1) { animation-delay: 0ms; }
.jecp-loader-dots span:nth-child(2) { animation-delay: 175ms; }
.jecp-loader-dots span:nth-child(3) { animation-delay: 350ms; }

@keyframes jecp-dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1;   }
}

/* ── SVG / Image ─────────────────────────────────────────────── */
.jecp-loader img,
.jecp-loader svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: jecp-spin var(--jecp-loader-speed, 700ms) linear infinite;
}

/* If SVG should not spin (static logo), add class jecp-loader--static */
.jecp-loader--static img,
.jecp-loader--static svg {
    animation: none;
}


/* ── Disable JetEngine / Elementor default listing loader ─── */
.jet-listing-grid .jet-listing-grid__loader,
.jet-listing-grid .jet-listing-grid__loading,
.jet-listing-grid .jet-listing-grid__loader-overlay,
.jet-listing-grid--loading::before,
.jet-listing-grid--loading::after,
.jet-listing-grid.loading::before,
.jet-listing-grid.loading::after,
.jet-listing-grid__loader-wrap {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* JE/Elementor listing widget opacity fade বন্ধ */
.elementor-widget-jet-listing-grid {
    transition: none !important;
    opacity: 1 !important;
}
.jet-listing-grid--loading .jet-listing-grid__items,
.jet-listing-grid.loading .jet-listing-grid__items {
    opacity: 1 !important;
}