/* Shared editorial resource list.
   Put the title or author first in the markup to match the page context. */

:where(.f12) .f12-editorial-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
}

:where(.f12) .f12-editorial-list__item {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(var(--f12-space-5), 3vw, var(--f12-space-8));
    margin: 0;
    padding: var(--f12-space-6) 0;
}

:where(.f12) .f12-editorial-list__item:not(:last-child) {
    border-bottom: 1px solid var(--f12-color-border-subtle);
}

:where(.f12) .f12-editorial-list__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--f12-radius-2);
    background: var(--f12-color-surface-subtle);
}

:where(.f12) .f12-editorial-list__media:focus-visible {
    outline: 2px solid var(--f12-color-brand-editorial);
    outline-offset: 3px;
}

:where(.f12) .f12-editorial-list__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--f12-duration-normal) var(--f12-ease-standard);
}

:where(.f12) .f12-editorial-list__media:hover img,
:where(.f12) .f12-editorial-list__media:focus-visible img {
    transform: scale(1.025);
}

:where(.f12) .f12-editorial-list__copy,
:where(.f12) .f12-editorial-list__summary {
    display: grid;
    min-width: 0;
}

:where(.f12) .f12-editorial-list__copy {
    gap: var(--f12-space-2);
}

:where(.f12) .f12-editorial-list__summary {
    gap: var(--f12-space-2);
}

:where(.f12) .f12-editorial-list__title,
:where(.f12) .f12-editorial-list__meta,
:where(.f12) .f12-editorial-list__description {
    margin: 0;
}

:where(.f12) .f12-editorial-list__meta {
    color: var(--f12-color-text-muted);
}

:where(.f12) .f12-editorial-list__title a:is(:link, :visited, :hover, :focus, :focus-visible, :active) {
    color: var(--f12-color-text-heading);
    text-decoration: none;
}

:where(.f12) .f12-editorial-list__action {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 900px) {
    :where(.f12) .f12-editorial-list__item {
        grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    }

    :where(.f12) .f12-editorial-list__action {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    :where(.f12) .f12-editorial-list__item {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--f12-space-4);
    }

    :where(.f12) .f12-editorial-list__action {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.f12) .f12-editorial-list__media img {
        transition: none;
    }
}
