/* ============================================================
   .uk-paging-nav — proposed canonical prev/next pagination (loaded only on /docs/ui-kit)
   ============================================================
   Replaces the bespoke prev/next pagination on `/product-news/{slug}` in
   `public/css/product-news.css`:

     .product-news-nav             -> .uk-paging-nav
     .product-news-nav-link        -> .uk-paging-nav-link
     .product-news-nav-prev        -> .uk-paging-nav-link composes with --prev (label-with-arrow on the left)
     .uk-product-news-nav        -> .uk-paging-nav-link composes with --next (label-with-arrow on the right)
     .product-news-nav-label       -> .uk-paging-nav-label
     .product-news-nav-title       -> .uk-paging-nav-title

   Designed for any single-item page that has linear neighbours — product
   news entries, future docs articles, blog posts, changelog releases.

   Composes with: nothing — leaf primitive. The arrow glyphs are inline
   pseudo-elements; the consumer just provides the label and title text.
   When only one neighbour exists, render an empty `<div>` placeholder in
   the missing slot so the surviving link stays anchored to its edge
   (alternative: omit the wrapper entirely and the single link becomes
   centered — see --single modifier).
   ============================================================ */

/* ============================================
   Root — two-up grid, prev on the left, next on the right
   ============================================
   Uses `display: grid` rather than `flex space-between` so empty slots
   (single-neighbour pages) hold their column rather than collapsing.
   ============================================ */
.uk-paging-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
}

/* ============================================
   Link — prev/next tile
   ============================================
   Vertical stack: tiny uppercase label above, bigger title below. Tile
   pulls a soft hover lift + border tint to match `.uk-card--hoverable`.
   ============================================ */
.uk-paging-nav-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: rgba(var(--color-primary-rgb), 0.05);
    border: 1px solid rgba(var(--color-primary-rgb), 0.15);
    border-radius: var(--radius-xl);
    color: var(--color-text);
    text-decoration: none;
    transition:
        transform var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base);
    min-width: 0;
}

.uk-paging-nav-link:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--color-primary-rgb), 0.4);
    box-shadow: var(--shadow-card-hover-sm);
}

.uk-paging-nav-link:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ============================================
   --prev / --next — direction modifiers
   ============================================
   `--prev` left-aligns the stack and prepends a small ‹ arrow to the
   label. `--next` right-aligns and appends a › arrow. The arrows live in
   pseudo-elements so the markup stays clean (label + title only).
   ============================================ */
.uk-paging-nav-link--prev {
    align-items: flex-start;
    text-align: left;
}

.uk-paging-nav-link--next {
    align-items: flex-end;
    text-align: right;
    grid-column: 2;
}

.uk-paging-nav-link--prev .uk-paging-nav-label::before {
    content: '\2190'; /* ← */
    margin-right: 0.4em;
    color: var(--color-primary-light);
}

.uk-paging-nav-link--next .uk-paging-nav-label::after {
    content: '\2192'; /* → */
    margin-left: 0.4em;
    color: var(--color-primary-light);
}

/* ============================================
   Label / title — typography
   ============================================ */
.uk-paging-nav-label {
    color: var(--color-text-muted);
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: var(--line-snug);
}

.uk-paging-nav-title {
    color: var(--color-text);
    font-size: var(--font-md);
    font-weight: 600;
    line-height: var(--line-snug);
    word-break: break-word;
}

/* ============================================
   --single — single-neighbour pages (only prev OR next)
   ============================================
   Drops the two-column grid and centres the surviving link. Use when the
   first or last entry doesn't have a neighbour on one side and you don't
   want an empty column.
   ============================================ */
.uk-paging-nav--single {
    grid-template-columns: minmax(0, max-content);
    justify-content: center;
}

/* ============================================
   Mobile — stack vertically below 640px
   ============================================
   On narrow viewports the two tiles stack with prev on top, next below.
   Both tiles re-align to the centre so the arrow direction stays visually
   consistent.
   ============================================ */
@media (max-width: 640px) {
    .uk-paging-nav {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .uk-paging-nav-link--next {
        grid-column: 1;
    }
}
