/*
 * Photo-credit overlay for core Image and Media & Text blocks.
 */
.wp-block-image,
.wp-block-media-text__media {
    position: relative;
}

.mc-photo-credit {
    position: absolute;
    right: auto;
    bottom: 8px;
    left: 8px;
    z-index: 5;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100% - 16px);
    margin: 0;
    padding: 5px 9px;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
    text-align: left;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 4px;
}

.mc-photo-credit.is-right {
    right: 8px;
    left: auto;
    text-align: right;
}

.mc-photo-credit.is-left {
    right: auto;
    left: 8px;
}

/* The marker is used only to locate the block's figure for the React portal. */
.mc-photo-credit-anchor {
    display: none !important;
}

/* The editor preview is informational and must not intercept block controls. */
.editor-styles-wrapper .mc-photo-credit {
    pointer-events: none;
    user-select: none;
}
