.img-preview-wrap-input {
    position: relative;
    width: 100%;
    max-width: 500px;
/*     margin: 0 auto 20px auto; */
    display: block; /* Always visible in edit layout form paths */
}

.img-preview {
    width: 100%;
    height: 500px !important;
    background-size: contain;
    background-position: center;
    background-color: #f9f9f9;
	    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px dashed #ddd;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.img-preview-override {
    background-color: transparent !important;
	   
    border-radius: none !important;
    border: none !important; 
}
.img-preview-wrap-input-override
{
	max-width:none !important;
}

.img-preview:hover {
    border-color: var(--e-global-color-primary, #333);
}

/* Clear prompts out if backgrounds are loaded */
.img-preview.has-image .upload-prompt {
    display: none;
}

.upload-prompt {
    text-align: center;
    color: #888;
    pointer-events: none; /* Passes click tracking directly down to canvas engine */
}

/* Contextual Clear/Delete Button Setup */
.remove-pic {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
	box-sizing: border-box !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important; /* Prevents text bounds from stretching the native button size */
    line-height: 1 !important;
    height: 30px;
    border-radius: 50%;
    background: rgba(219, 68, 85, 0.9); /* Enhanced clean visual indicator alert red */
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.1s ease;
}

.remove-pic:hover {
    transform: scale(1.1);
}

/* FIX: Clear class-only targeting rule to reveal the delete button */
.img-preview-wrap-input.has-image-wrap .remove-pic {
    display: flex !important;
}
