.species-video-credit:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .15rem .5rem;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: .25rem auto .3rem;
    padding: .1rem .25rem .1rem .55rem;
    border: 1px solid #c5dcd8;
    border-radius: .65rem;
    background: #eaf3ef;
    color: #234b53;
    font: 600 .85rem/1.35 system-ui, sans-serif;
}

.species-video-credit .species-video-credit-author {
    overflow-wrap: anywhere;
}

.species-video-credit .species-video-credit-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 1.5rem;
    padding: .15rem .45rem;
    border-radius: .4rem;
    background: #d3e8e3;
    color: #174752;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.species-video-credit .species-video-credit-link:hover {
    background: #bfded7;
    text-decoration: underline;
}

.species-video-credit .species-video-credit-link:focus-visible {
    outline: 2px solid #247d89;
    outline-offset: 3px;
}

html[data-dive-theme="dark"] .species-video-credit:not([hidden]) {
    background: #19333a;
    border-color: #42636a;
    color: #e0efec;
}

html[data-dive-theme="dark"] .species-video-credit .species-video-credit-link {
    background: #2b5158;
    color: #ecf8f6;
}

.species-media-footer:has(> .species-contribute) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .35rem;
    margin: .25rem 0 .65rem;
}

.species-media-footer > .species-contribute {
    grid-area: 1 / 2;
    margin: 0;
    padding: .2rem .4rem;
    background: transparent;
}

@media (max-width: 760px) {
    .species-media-footer:has(> .species-contribute) {
        grid-template-columns: minmax(0, 1fr);
    }

    .species-media-footer > .species-contribute {
        grid-area: auto;
    }
}

#ytLayer > .species-video-credit:not([hidden]) {
    position: absolute;
    z-index: 31;
    inset: auto .6rem .45rem auto;
    max-width: calc(100% - 1.2rem);
    justify-content: flex-end;
    margin: 0;
    background: #051619ee;
    border-color: #527b81;
    color: #fff;
    pointer-events: auto;
}

#ytLayer > .species-video-credit .species-video-credit-link {
    background: #a9edf3;
    color: #092c34;
    font-weight: 750;
}

#ytLayer > .species-video-credit .species-video-credit-link:hover {
    background: #d3faff;
}

#ytLayer > .species-video-credit .species-video-credit-link:focus-visible {
    outline-color: #fff;
}
