/**
 * Pageable Container Widget Styles
 *
 * Self-contained CSS — no dependency on WPBakery.
 * Replicates the visual design of WPBakery's pagination dots.
 *
 * @package Anps_Theme_Plugin
 * @since 1.2.0
 */

/* ── Container ── */
.anps-pageable-container {
    position: relative;
}

/* ── Panels ── */
.anps-pageable-panels {
    position: relative;
    overflow: hidden;
}

.anps-pageable-panel {
    display: none;
}

.anps-pageable-panel.anps-active {
    display: block;
}

/* Slide animation: outgoing panel stays in place while incoming slides over it */
.anps-pageable-panels.anps-sliding {
    /* keep height stable during transition */
}

.anps-pageable-panel.anps-slide-out {
    display: block;
    position: relative;
}

.anps-pageable-panel.anps-slide-in {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    animation: anps-pageable-slide-over 0.4s ease-out forwards;
}

/* ── Pagination Dots ── */
.anps-pageable-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 15px 0 0;
    padding: 0;
    text-align: center;
}

.anps-pageable-dot {
    display: inline-block;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    cursor: pointer;
}

.anps-pageable-dot span {
    display: block;
    width: 10px;
    height: 10px;
    margin: 5px 7px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.anps-pageable-dot span:focus {
    outline: none;
}

.anps-pageable-dot.anps-active span {
    cursor: default;
}

/* ── Style: Flat ── */
.anps-dots-flat .anps-pageable-dot span {
    background-color: #ebebeb;
    opacity: 0.6;
}

.anps-dots-flat .anps-pageable-dot span:hover {
    opacity: 1;
}

.anps-dots-flat .anps-pageable-dot.anps-active span {
    opacity: 1;
}

/* ── Style: Outline ── */
.anps-dots-outline .anps-pageable-dot span {
    border: 3px solid #ebebeb;
    background: transparent;
}

.anps-dots-outline .anps-pageable-dot.anps-active span,
.anps-dots-outline .anps-pageable-dot span:hover {
    background-color: #ebebeb;
}

/* ── Shape: Round ── */
.anps-dots-round .anps-pageable-dot span {
    border-radius: 50%;
}

/* ── Shape: Square ── */
.anps-dots-square .anps-pageable-dot span {
    border-radius: 0;
}

/* ── Shape: Rounded ── */
.anps-dots-rounded .anps-pageable-dot span {
    border-radius: 3px;
}

/* ── Animation: Fade ── */
@keyframes anps-pageable-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.anps-pageable-panel.anps-anim-fade.anps-active {
    animation: anps-pageable-fade-in 0.35s ease-in-out;
}

/* ── Animation: Slide (from bottom, over old content) ── */
@keyframes anps-pageable-slide-over {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.anps-pageable-panel.anps-anim-slide.anps-active {
    /* fallback for non-JS: just show */
}

/* ── Editor: always show panels stacked ── */
.elementor-editor-active .anps-pageable-panel {
    display: block;
    border: 1px dashed #d5dadf;
    margin-bottom: 10px;
    min-height: 40px;
}

.elementor-editor-active .anps-pageable-panel.anps-active {
    border-color: #71d7f7;
}

/* Editor: ensure child containers inside the panels wrapper are visible */
.elementor-editor-active .anps-pageable-panels {
    overflow: visible;
}

.elementor-editor-active .anps-pageable-panels > .elementor-element {
    display: block;
    min-height: 40px;
    margin-bottom: 10px;
    border: 1px dashed #d5dadf;
}

.elementor-editor-active .anps-pageable-panels > .elementor-element:first-child {
    border-color: #71d7f7;
}
