/* urlr/screenshot-media block — frontend figure + editor canvas. */

.wp-block-urlr-screenshot-media {
    position: relative;
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #E6EFF5;
    border-radius: 12px;
}

/* Sidebar modifiers. The two-class selectors outrank the base rules above
   both on the frontend and in the editor canvas, so the toggles apply in
   both places. */
.wp-block-urlr-screenshot-media.urlr-sm-no-border {
    border: none;
}

.wp-block-urlr-screenshot-media.urlr-sm-centered {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-urlr-screenshot-media img {
    display: block;
    max-width: 100%;
    height: auto;
    /* Round the image itself (12px from the figure), not only the wrapper's
       overflow clip, so the corners stay rounded whatever the context. */
    border-radius: inherit;
}

/* Feature gradient overlaid on the bottom half of the screenshot. The
   preset gradient (set inline as --urlr-sm-overlay by the render callback)
   is stacked on itself so its semi-transparent end stop combines with
   itself (0.2 alpha becomes ~0.36), making the band clearly visible at
   the bottom while the screenshot stays readable above it. */
.urlr-screenshot-media-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    pointer-events: none;
    background-image: var(--urlr-sm-overlay, none), var(--urlr-sm-overlay, none);
}

/* Editor canvas */
.editor-styles-wrapper .urlr-sm-canvas-img {
    display: block;
    max-width: 100%;
    height: auto;
}

.editor-styles-wrapper .urlr-sm-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-size: 12px;
    color: #757575;
}

.editor-styles-wrapper .urlr-sm-hint {
    color: #757575;
    font-size: 12px;
}
