/**
 * Ajax Pagination Widget - Estilos Frontend
 * Author: Erick Ticona
 * Portfolio: https://erickticona-dev.github.io/portafolio/
 */

.apw-pagination-container {
    position: relative;
    width: 100%;
    margin-top: 30px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.apw-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.apw-numbers-list {
    display: flex;
    align-items: center;
    gap: inherit;
}

/* Botones de Paginación */
.apw-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.apw-page-btn:hover:not(.is-disabled) {
    background-color: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.apw-page-btn.is-active {
    background-color: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    cursor: default;
    transform: none;
}

.apw-page-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* Iconos y Flechas */
.apw-arrow-icon {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.apw-page-btn:hover:not(.is-disabled) .apw-prev-btn .apw-arrow-icon {
    transform: translateX(-2px);
}

.apw-page-btn:hover:not(.is-disabled) .apw-next-btn .apw-arrow-icon {
    transform: translateX(2px);
}

.apw-btn-img {
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
    display: inline-block;
}

.apw-btn-text {
    margin: 0 6px;
    font-size: 14px;
}

/* Efecto de Carga en Elementor Posts */
.apw-posts-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.3s ease;
    filter: blur(1px);
}

/* Spinner AJAX */
.apw-ajax-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.apw-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: apw-spin 0.8s linear infinite;
}

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

/* Media Queries Responsivos */
@media (max-width: 767px) {
    .apw-page-btn {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .apw-pagination-wrapper {
        gap: 6px;
    }

    .apw-btn-text {
        display: none; /* Ocultar textos largos en móvil para mantener diseño limpio */
    }
}
