/**
 * "More from this author" — posts by the same author, injected right before the
 * last paragraph of a single post (Customizer > Post Display).
 *
 * A framed card of compact entries: a small thumbnail on the left, the title
 * and date on the right. Mobile-first — the entries stack vertically on phones
 * and sit three-across (separated by thin vertical rules) from 641px up. Titles
 * are line-clamped so a long headline can never push the thumbnail out of shape.
 *
 * Theme-neutral on purpose: this file is byte-identical in every theme of the
 * family and uses neutral rgba borders + `color: inherit` instead of theme
 * tokens, so it also reads correctly under the reading-controls sepia and dark
 * themes (which force page colours with !important). Child selectors are
 * written as `.author-more-posts .author-more-posts__x` so they match the
 * specificity of the themes' `.prose x` rules and win on source order (this
 * stylesheet is enqueued after the theme stylesheet).
 */

.author-more-posts {
    margin: 2rem 0;
    padding: 0.875rem 1rem 1rem;
    border: 1px solid rgba(127, 127, 127, 0.28);
    border-radius: 12px;
    background-color: rgba(127, 127, 127, 0.045);
}

.author-more-posts .author-more-posts__title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0 0 0.75rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0.65;
}

/* Thin rule filling the space to the right of the label. */
.author-more-posts .author-more-posts__title::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background-color: rgba(127, 127, 127, 0.3);
}

/* Phones: one entry per row, separated by a thin rule. */
.author-more-posts .author-more-posts__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.author-more-posts .author-more-posts__item {
    min-width: 0;
}

.author-more-posts .author-more-posts__item + .author-more-posts__item {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(127, 127, 127, 0.18);
}

.author-more-posts .author-more-posts__link {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.25rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.author-more-posts .author-more-posts__link:hover,
.author-more-posts .author-more-posts__link:focus-visible {
    background-color: rgba(127, 127, 127, 0.1);
}

.author-more-posts .author-more-posts__link:hover .author-more-posts__text,
.author-more-posts .author-more-posts__link:focus-visible .author-more-posts__text {
    text-decoration: underline;
}

.author-more-posts .author-more-posts__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    background-color: rgba(127, 127, 127, 0.14);
}

.author-more-posts .author-more-posts__image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

.author-more-posts .author-more-posts__body {
    display: block;
    min-width: 0;
}

.author-more-posts .author-more-posts__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    /* Break inside an over-long word rather than widening the row. */
    overflow-wrap: anywhere;
}

.author-more-posts .author-more-posts__date {
    display: block;
    margin-top: 0.1875rem;
    font-size: 0.6875rem;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0.6;
}

/* Desktop / tablet: three entries across, thin vertical rules between them. */
@media (min-width: 641px) {
    .author-more-posts {
        padding: 1rem 1.125rem 1.125rem;
    }

    .author-more-posts .author-more-posts__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem 1.125rem;
    }

    .author-more-posts .author-more-posts__item + .author-more-posts__item {
        padding-top: 0;
        padding-left: 1.125rem;
        border-top: 0;
        border-left: 1px solid rgba(127, 127, 127, 0.18);
    }

    /* First column of each row starts a new row: no vertical rule. */
    .author-more-posts .author-more-posts__item:nth-child(3n + 1) {
        padding-left: 0;
        border-left: 0;
    }

    .author-more-posts .author-more-posts__link {
        grid-template-columns: 68px 1fr;
        gap: 0.625rem;
        padding: 0.125rem;
    }

    .author-more-posts .author-more-posts__text {
        -webkit-line-clamp: 3;
    }
}
