/* ==========================================================
   DPV Post Pagination — Stylesheet v1.0.0
   Card styles are inherited from card-shared.css
   This file only adds grid + pagination controls.
   ========================================================== */

/* ----------------------------------------------------------
   WRAPPER
---------------------------------------------------------- */
.dpv-post-pagination {
    width: 100%;
}

/* ----------------------------------------------------------
   GRID
---------------------------------------------------------- */
.dpv-pp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .dpv-pp-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 767px) {
    .dpv-pp-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ----------------------------------------------------------
   IMAGE — extends .dpv-pc-image from card-shared.css
---------------------------------------------------------- */
.dpv-pp-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.dpv-pp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* ----------------------------------------------------------
   PAGINATION CONTROLS
---------------------------------------------------------- */
.dpv-pp-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

/* Page button — angka, prev, next */
.dpv-pp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

a.dpv-pp-page-btn:hover {
    background: #f0f7ff;
    border-color: #185FA5;
    color: #185FA5;
    text-decoration: none;
}

.dpv-pp-page-btn.is-active {
    background: #185FA5;
    border-color: #185FA5;
    color: #ffffff;
    cursor: default;
    pointer-events: none;
}

.dpv-pp-page-btn.dpv-pp-ellipsis {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
    color: #9ca3af;
}

/* Focus visible accessibility */
a.dpv-pp-page-btn:focus-visible {
    outline: 2px solid #185FA5;
    outline-offset: 2px;
}

/* ----------------------------------------------------------
   LOAD MORE BUTTON
   Extends .dpv-pc-read-more from card-shared.css
---------------------------------------------------------- */
.dpv-pp-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border-radius: 8px;
    background: transparent;
    color: #185FA5;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #185FA5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpv-pp-load-more:hover {
    background: #185FA5;
    color: #ffffff;
}

.dpv-pp-load-more:disabled,
.dpv-pp-load-more.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner while loading */
.dpv-pp-load-more.is-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: dpv-pp-spin 0.6s linear infinite;
    margin-left: 6px;
}

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

/* No more text */
.dpv-pp-no-more {
    width: 100%;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    margin: 0;
}

/* ----------------------------------------------------------
   RESPONSIVE PAGINATION
---------------------------------------------------------- */
@media (max-width: 767px) {
    .dpv-pp-page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .dpv-pp-pagination {
        gap: 4px;
        margin-top: 24px;
    }
}
