/**
 * Universal Image Editor Wrapper
 * Makes any image editable with the inline editor
 */

/* Wrapper container for individual editable images */
.editable-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.editable-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* Edit overlay for individual images */
.editable-image-wrapper .image-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: inherit;
}

.editable-image-wrapper:hover .image-edit-overlay {
    opacity: 1;
}

.editable-image-wrapper .image-edit-button {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editable-image-wrapper .image-edit-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* Edit mode badge */
.edit-mode-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent, #ff6b6b);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.editable-image-wrapper:hover .edit-mode-badge {
    opacity: 1;
}

/* Container adjustments for different image sizes */
.editable-image-wrapper.thumbnail {
    max-width: 200px;
}

.editable-image-wrapper.medium {
    max-width: 500px;
}

.editable-image-wrapper.large {
    max-width: 100%;
}

/* Portfolio card integration */
.portfolio-card .editable-image-wrapper {
    border-radius: 8px;
    overflow: hidden;
}

.portfolio-card .editable-image-wrapper img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Service card integration */
.service-card .editable-image-wrapper {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.service-card .editable-image-wrapper img {
    width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .editable-image-wrapper .image-edit-button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .edit-mode-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}
