/*
 * ARTIST CARDS (plugin nrwkulturprograms_artistgroups, design C5), also the cards of the internal programs (plugin
 * nrwkulturprograms_internalprograms, image, title and teaser)
 * Grid and card (border, radius) of the base list (.list__wrapper, .list--cards, see base.css). The image 16:9 reaches
 * the border of the card, the text below has the padding of the card. The name links to the detail view, the link
 * covers the whole card, on hover the name is underlined.
 */

/* Same specificity as the card of the base list, to replace its padding */
.list__wrapper.list--cards :is(.list__item--artistgroup, .list__item--internalprogram) {
    position: relative;
    justify-content: flex-start;
    gap: 0;
    overflow: hidden;
    padding: 0;
}

/* Format landscape (16:9, see ImageViewHelper), the box keeps it without image */
:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__media {
    aspect-ratio: var(--ratio--landscape);
    background-color: var(--color--light-grey);
}

:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__image {
    height: 100%;
}

:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__content {
    padding: var(--card--padding);
}

:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__title {
    font-size: var(--font-size--h4);
    line-height: var(--line-height--sub-headline);
    hyphens: auto;
}

:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__meta {
    margin-top: var(--layout--gap--small);
    font-size: var(--font-size--text-small);
    line-height: 1.25;
}

/* Teaser of the internal programs in small text */
.list__item--internalprogram .list__item__teaser {
    margin-top: var(--layout--gap--small);
    font-size: var(--font-size--text-small);
    line-height: var(--line-height--text-small);
}

/* The name is underlined on hover only */
:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__link {
    text-decoration: none;
}

:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

:is(.list__item--artistgroup, .list__item--internalprogram) .list__item__link:hover {
    text-decoration: underline;
    text-decoration-thickness: var(--text-decoration-thickness--regular);
    text-underline-offset: .15em;
}

:is(.list__item--artistgroup, .list__item--internalprogram):has(.list__item__link:focus-visible) {
    outline: var(--outline-width--default) solid var(--color--dark-grey);
    outline-offset: var(--outline-offset--default);
}
