.mfis-pagination-hidden {
    display: none !important;
}

.mfis-controls {
    clear: both;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 1px;
    margin: 0;
    padding: 0;
}

.mfis-sentinel {
    width: 100%;
    height: 1px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* The plugin toggles the native hidden attribute for status UI. Explicitly
 * honour it because some theme/archive CSS can otherwise override the browser's
 * default [hidden] rule and expose MFIS loading/finished text. */
.mfis-status[hidden] {
    display: none !important;
}

.mfis-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 1rem auto;
    min-height: 2rem;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.mfis-status[data-mode="finished"] .mfis-spinner,
.mfis-status[data-mode="error"] .mfis-spinner {
    display: none;
}

.mfis-spinner {
    width: 1.05rem;
    height: 1.05rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mfis-spin 0.75s linear infinite;
}

.mfis-load-more {
    appearance: none;
    cursor: pointer;
    margin: 0.75rem auto 1.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.2;
}

.mfis-load-more:hover,
.mfis-load-more:focus-visible {
    opacity: 0.82;
}

.mfis-load-more:disabled {
    cursor: wait;
    opacity: 0.6;
}

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

@media (prefers-reduced-motion: reduce) {
    .mfis-spinner {
        animation-duration: 1.5s;
    }
}

/* Reserve the visual footprint of prefetched magazine covers before decoding.
 * The exact intrinsic ratio replaces this fallback as soon as it is known. */
.mfis-new-item img.mfis-cover-reserved {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: contain;
}

/* Above-the-fold covers must never remain hidden by a lazy-loader class after
 * the real source has loaded. This rule applies only to the four initial items. */
img.mfis-initial-cover {
    visibility: visible !important;
}

img.mfis-initial-cover-loaded {
    opacity: 1 !important;
}
