/* MwImageModifier — colorize/modify image preview */

.mw-im {
    display: flex;
    gap: 1.25rem;
    height: 100%;
    min-height: 350px;
}

/* Live preview area */
.mw-im-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-image:
        linear-gradient(45deg, var(--mud-palette-dark) 25%, transparent 25%),
        linear-gradient(-45deg, var(--mud-palette-dark) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--mud-palette-dark) 75%),
        linear-gradient(-45deg, transparent 75%, var(--mud-palette-dark) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: var(--mud-palette-surface);
}

.mw-im-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Controls panel */
.mw-im-controls {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Theme color swatches */
.mw-im-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.mw-im-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.mw-im-swatch:hover {
    transform: scale(1.1);
}

.mw-im-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--mud-palette-primary);
}
