.media-row {
    gap: 14px;
}

// Each thumbnail carries its own remove control, revealed on hover/focus.
.image-picker__item {
    position: relative;
    display: inline-flex;
}

.image-picker__remove {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    color: $portal-white;
    background: $portal-ink;
    border: 2px solid $portal-white;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease;
}

.image-picker__item:hover .image-picker__remove,
.image-picker__remove:focus-visible {
    opacity: 1;
}

.image-picker__remove:hover:not(:disabled) {
    background: $portal-error-text;
}

.image-picker__remove:disabled {
    opacity: 0.4;
}

// Removing is destructive, so the × asks first.
.image-picker__confirm {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    background: rgba($portal-ink, 0.82);
    border-radius: 8px;
}

.image-picker__confirm button {
    padding: 0;
    color: $portal-white;
    background: none;
    border: 0;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.image-picker__confirm-yes:hover:not(:disabled) {
    color: $portal-error-bg;
    text-decoration: underline;
}

.image-picker__confirm-no {
    opacity: 0.75;
    font-weight: 500;
}

.image-placeholder {
    border: 1px solid $portal-field-line;
    border-radius: 8px;
    background: $portal-placeholder;
    color: $portal-placeholder-text;
    font-size: 11px;
    line-height: 1;
}

.image-placeholder img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.portal-add-image-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.image-placeholder--sm,
.image-picker__trigger--sm,
.image-preview--sm {
    width: 86px;
    height: 74px;
}

.image-placeholder--md,
.image-picker__trigger--md,
.image-preview--md {
    width: 86px;
    height: 86px;
}

.image-picker__trigger {
    position: relative;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.image-picker__trigger input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.image-preview {
    display: block;
    border-radius: 8px;
    object-fit: cover;
    background: $portal-placeholder;
}