/* inked/assets/css/magazine-v2/listing.css */
/**
 * Magazine Listing v2 — Page Styles
 * Only magazine-unique styles. Grid, cards, load-more, pills reuse
 * shared design-system and homepage-v2 classes.
 * @version 2.1.0
 * @date 2026-03-11
 */

/* DSv2 Wave 1 — major-section spacing (§C.7). The .section-mast component owns
   its own top margin; drop legacy .section-gap padding so chrome rhythm isn't
   doubled. Outer .magazine-listing > section-gap blocks now flow at
   space-16/-20 cadence via the mast. */
.magazine-listing .section-gap:has(> .container > .section-mast:first-child) {
  padding-top: 0;
}

/* PAGE HEADER — retired. The magazine page now uses the canonical
   listing-hero.v2 chunk (design-system/components/listing-hero.css),
   matching /tatuirovki, /studios, etc. Old .mag-page-header styles removed
   2026-06-14 (unification). */

/* ═══════════ NUMBERED PAGINATION ═══════════ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0 2rem;
    margin: 0;
}

.pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
}

.pagination__link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.pagination__link--active {
    background: var(--color-brand-accent);
    color: #000;
    font-weight: 700;
    border-color: var(--color-brand-accent);
    cursor: default;
}

.pagination__link--active:hover {
    color: #000;
    border-color: var(--color-brand-accent);
}

.pagination__link--disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

.pagination__ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2.5rem;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    user-select: none;
}

/* ═══════════ SEO DESCRIPTION (bottom) ═══════════ */

.mag-seo-text {
    padding: 2.5rem 0 2rem;
    margin: 1rem auto 0;
    max-width: 800px;
    border-top: 1px solid var(--border-color);
}

.mag-seo-text p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-loose);
    margin-bottom: 0.75rem;
}

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 767px) {
    .pagination__link {
        min-width: 2.5rem;
        min-height: 2.5rem;
    }
}

/* Infinite-scroll sentinel + spinner (replaces the old "Показать ещё" button).
   Mirrors the catalog-listing pattern (tattoos/masters). */
.mag-scroll-sentinel {
    width: 100%;
    height: 1px;
}

.mag-scroll-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px 24px 56px;
}

.mag-scroll-spinner .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border, rgba(255, 255, 255, 0.1));
    border-top-color: var(--gold, #c8a45e);
    border-radius: 50%;
    animation: mag-spin 0.6s linear infinite;
}

@keyframes mag-spin {
    to { transform: rotate(360deg); }
}
