/* Keep the three block previews consistent with their storefront presentation. */
/* Shared styles load through the versioned WordPress stylesheet dependency. */

.editor-styles-wrapper .ctcl-product-container .components-base-control {
    margin-bottom: 18px;
}
.editor-styles-wrapper .ctcl-image-gallery-block {
    min-width: 0;
    max-width: 100%;
}
.editor-styles-wrapper .ctclig-media-button {
    margin-top: 16px;
    min-height: 44px;
    border-radius: 8px;
}

/* React-rendered editor preview shares the storefront's sizing and surfaces. */
.ctcl-editor-gallery .ctclig-main-image {
    display: grid;
    place-items: center;
    cursor: default;
}
.ctcl-editor-gallery .ctcl-gallery-placeholder {
    padding: 20px;
    text-align: center;
    color: var(--ctcl-muted);
    font-size: 14px;
}
.ctcl-editor-gallery .ctclig-image-cont {
    overflow-x: auto;
    overflow-y: hidden;
}
.ctcl-editor-gallery .ctcl-gallery-preview-thumbnail {
    display: block;
    flex: 0 0 72px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}
.ctcl-editor-gallery .ctcl-gallery-preview-thumbnail img { display: block; }
.ctcl-editor-gallery .ctcl-gallery-preview-thumbnail[aria-pressed="true"] img {
    border-color: var(--ctcl-accent);
    box-shadow: inset 0 0 0 1px var(--ctcl-accent);
}
.ctcl-editor-gallery .ctcl-gallery-preview-thumbnail:focus-visible {
    outline: 3px solid var(--ctcl-accent);
    outline-offset: 2px;
}

/* Keep editor-only actions and native select controls inside narrow columns. */
.editor-styles-wrapper .ctcl-product-container > .components-button.is-secondary {
    width: 100%;
    height: auto;
    min-height: 40px;
    white-space: normal;
    line-height: 1.5;
}
.editor-styles-wrapper .ctcl-product-container .components-select-control,
.editor-styles-wrapper .ctcl-product-container .components-input-control__container {
    min-width: 0;
    max-width: 100%;
}

/* Older open editor sessions may still place the quantity label in the grid. */
.ctcl-product-container .ctcl-quantity > span:first-child:not(.ctcl-minus-qty) {
    grid-column: 1 / -1;
    width: 100%;
    white-space: normal;
    font-size: 14px;
    font-weight: 600;
}
