/* ==========================================================================
   Main: page-specific sections and WordPress output
   base.css, layout.css, components.css and utilities.css are enqueued
   before this file in inc/setup.php, in that order, instead of @import.
   ========================================================================== */

/* ==========================================================================
   WordPress
   ========================================================================== */

/* Editor content: images and captions from the block or classic editor */
.rich-text .wp-block-image,
.rich-text .wp-caption {
    max-width: 100%;
}

.rich-text .wp-element-caption,
.rich-text .wp-caption-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-500);
}

.rich-text .aligncenter {
    margin-inline: auto;
}

/* Blog pagination */
.pagination {
    margin-top: 2.4rem;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0 0.9rem;
    border: 2px solid var(--fjord-700);
    border-radius: var(--radius-pill);
    font-weight: 700;
    color: var(--fjord-800);
    text-decoration: none;
}

.pagination .page-numbers:hover {
    background: var(--fjord-700);
    color: var(--white);
}

.pagination .page-numbers.current {
    background: var(--fjord-800);
    color: var(--white);
}

/* ==========================================================================
   Page: Photo credits (page-templates/credits.php)
   ========================================================================== */

.credits {
    max-width: 74ch;
}

.credits > .rich-text {
    margin-bottom: 1.5rem;
}

.credits__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.credits__item {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding-block: 1rem;
    border-top: 1px solid var(--mist-200);
}

.credits__item img {
    width: 4.5rem;
    height: 3rem;
    border-radius: 0.375rem;
    object-fit: cover;
}

.credits__item p {
    margin: 0;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.credits__use {
    font-weight: 700;
    color: var(--fjord-900);
}

/* Keep the sticky header below the admin toolbar for logged-in editors.
   The toolbar scrolls away below 601px, is fixed at 46px tall up to 782px,
   and 32px tall above that. */
@media (min-width: 37.5625em) {
    .admin-bar .site-header {
        top: 46px;
    }
}

@media (min-width: 48.9375em) {
    .admin-bar .site-header {
        top: 32px;
    }
}
