.rwpis-ui {
    clear: both;
    position: relative;
    width: 100%;
    min-height: 1px;
    padding: 8px 0 28px;
    text-align: center;
}

.rwpis-sentinel {
    display: block;
    width: 100%;
    height: 1px;
    pointer-events: none;
}

.rwpis-status {
    min-height: 24px;
    margin: 8px auto;
    color: inherit;
    font-size: 14px;
}

.rwpis-ui[data-state="loading"] .rwpis-status::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 9px -2px 0;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: rwpis-spin .7s linear infinite;
}

.rwpis-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 42px;
    padding: 9px 20px;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font: inherit;
}

.rwpis-button[hidden] {
    display: none !important;
}

.rwpis-button:disabled {
    cursor: wait;
    opacity: .6;
}

.rwpis-cell.rwpis-pending {
    opacity: 0;
    visibility: hidden;
}

.rwpis-cell {
    transition: opacity .18s ease;
}

/*
 * Pagination remains in the server HTML for crawlers and as a failure fallback.
 * It is clipped only after the JavaScript loader has positively identified the
 * grid and next URL. Removing rwpis-hide-pagination restores it immediately.
 */
html.rwpis-ready.rwpis-hide-pagination .content > .paginator {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/*
 * Stable fallback for The7 installations whose private isotope API does not
 * accept externally appended cells. It preserves the native three-column
 * presentation and prevents overlapping or invisible posts.
 */
.content > .wf-container.dt-isotope.rwpis-css-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

/* The7's clearfix pseudo-elements otherwise consume the first/last grid slot. */
.content > .wf-container.dt-isotope.rwpis-css-grid::before,
.content > .wf-container.dt-isotope.rwpis-css-grid::after {
    content: none !important;
    display: none !important;
}

.content > .wf-container.dt-isotope.rwpis-css-grid > .wf-cell {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    opacity: 1;
    visibility: visible;
}

.content > .wf-container.dt-isotope.rwpis-css-grid img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .content > .wf-container.dt-isotope.rwpis-css-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .content > .wf-container.dt-isotope.rwpis-css-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .rwpis-cell,
    .rwpis-ui[data-state="loading"] .rwpis-status::before {
        transition: none;
        animation-duration: .01ms;
        animation-iteration-count: 1;
    }
}
